[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 08/47] scsi-generic: Simplify error handling code
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 08/47] scsi-generic: Simplify error handling code |
Date: |
Mon, 5 Feb 2018 20:28:22 +0100 |
From: Fam Zheng <address@hidden>
Coverity doesn't like the ignored return value introduced in
9d3b155186c278 (hw/block: Fix the return type), and other callers are
converted already in ceff3e1f01.
This one was added lately in d9bcd6f7f23a and missed the train. Do it
now.
Signed-off-by: Fam Zheng <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/scsi/scsi-generic.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c
index ba70c0d..7414fe2 100644
--- a/hw/scsi/scsi-generic.c
+++ b/hw/scsi/scsi-generic.c
@@ -482,7 +482,6 @@ static void scsi_generic_realize(SCSIDevice *s, Error
**errp)
int rc;
int sg_version;
struct sg_scsi_id scsiid;
- Error *local_err = NULL;
if (!s->conf.blk) {
error_setg(errp, "drive property not set");
@@ -516,11 +515,9 @@ static void scsi_generic_realize(SCSIDevice *s, Error
**errp)
error_setg(errp, "SG_GET_SCSI_ID ioctl failed");
return;
}
- blkconf_apply_backend_options(&s->conf,
- blk_is_read_only(s->conf.blk),
- true, &local_err);
- if (local_err) {
- error_propagate(errp, local_err);
+ if (!blkconf_apply_backend_options(&s->conf,
+ blk_is_read_only(s->conf.blk),
+ true, errp)) {
return;
}
--
1.8.3.1
- [Qemu-devel] [PULL 00/47] Misc patches for 2018-02-05, Paolo Bonzini, 2018/02/05
- [Qemu-devel] [PULL 01/47] memory: update comments and fix some typos, Paolo Bonzini, 2018/02/05
- [Qemu-devel] [PULL 02/47] qdev: rename typedef qdev_resetfn() -> DeviceReset(), Paolo Bonzini, 2018/02/05
- [Qemu-devel] [PULL 03/47] qdev: add helpers to be more explicit when using abstract QOM parent functions, Paolo Bonzini, 2018/02/05
- [Qemu-devel] [PULL 05/47] kvm: Add kvm_set_user_memory tracepoint, Paolo Bonzini, 2018/02/05
- [Qemu-devel] [PULL 06/47] qemu: improve hugepage allocation failure message, Paolo Bonzini, 2018/02/05
- [Qemu-devel] [PULL 04/47] qdev: use device_class_set_parent_realize/unrealize/reset(), Paolo Bonzini, 2018/02/05
- [Qemu-devel] [PULL 07/47] memory: set ioeventfd_update_pending after address_space_update_ioeventfds, Paolo Bonzini, 2018/02/05
- [Qemu-devel] [PULL 10/47] readline: don't free completions in readline_free(), Paolo Bonzini, 2018/02/05
- [Qemu-devel] [PULL 08/47] scsi-generic: Simplify error handling code,
Paolo Bonzini <=
- [Qemu-devel] [PULL 09/47] chardev: fix incorrect unref of source, Paolo Bonzini, 2018/02/05
- [Qemu-devel] [PULL 11/47] scripts/qemu-gdb/timers.py: define encoding in header comment, Paolo Bonzini, 2018/02/05
- [Qemu-devel] [PULL 12/47] memory-internal.h: Remove obsolete claim that header is obsolete, Paolo Bonzini, 2018/02/05
- [Qemu-devel] [PULL 13/47] i2c: Add a CONFIG_I2C master switch to the configuration files, Paolo Bonzini, 2018/02/05
- [Qemu-devel] [PULL 14/47] Add missing hvdos public domain attribution:, Paolo Bonzini, 2018/02/05
- [Qemu-devel] [PULL 15/47] hvf: ept_emulation_fault() needs NetApp BSD attribution, Paolo Bonzini, 2018/02/05
- [Qemu-devel] [PULL 18/47] exynos4210: workaround UBSAN compilation error, Paolo Bonzini, 2018/02/05
- [Qemu-devel] [PULL 16/47] Drop remaining bits of ia64 host support, Paolo Bonzini, 2018/02/05
- [Qemu-devel] [PULL 19/47] build-sys: add --enable-sanitizers, Paolo Bonzini, 2018/02/05
- [Qemu-devel] [PULL 21/47] vhost: add traces for memory listeners, Paolo Bonzini, 2018/02/05