diff options
author | Cédric Le Goater <clg@redhat.com> | 2024-05-22 19:01:02 +0200 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2024-06-24 08:03:33 +0200 |
commit | 4a6a90f30fa3b2973bbb6faf985466b4338f903f (patch) | |
tree | 6d900fb383f5d5fa8149609121b15acbc937e44c /hw/s390x/s390-ccw.c | |
parent | 9bf21277c4edabaef3346e2cb566040331fbc6e3 (diff) | |
download | qemu-4a6a90f30fa3b2973bbb6faf985466b4338f903f.zip qemu-4a6a90f30fa3b2973bbb6faf985466b4338f903f.tar.gz qemu-4a6a90f30fa3b2973bbb6faf985466b4338f903f.tar.bz2 |
s390x/css: Make CCWDeviceClass::realize return bool
Since the realize() handler of CCWDeviceClass takes an 'Error **'
argument, best practices suggest to return a bool. See the api/error.h
Rules section. While at it, modify the call in s390_ccw_realize().
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Anthony Krowiak <akrowiak@linux.ibm.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20240522170107.289532-3-clg@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'hw/s390x/s390-ccw.c')
-rw-r--r-- | hw/s390x/s390-ccw.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/s390x/s390-ccw.c b/hw/s390x/s390-ccw.c index a06e91d..4b8ede7 100644 --- a/hw/s390x/s390-ccw.c +++ b/hw/s390x/s390-ccw.c @@ -137,8 +137,7 @@ static void s390_ccw_realize(S390CCWDevice *cdev, char *sysfsdev, Error **errp) goto out_err; } - ck->realize(ccw_dev, &err); - if (err) { + if (!ck->realize(ccw_dev, &err)) { goto out_err; } |