Skip to contentSkip to conversation

vhost-scsi: fix cut-and-paste typo

PATCH In review Paolo Bonzini 2 participants 3 messages May 31, 2013 – Jun 3, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vhost-scsi: fix cut-and-paste typo

The copied code comes from vhost_scsi_start. Spotted by Coverity.

---
 hw/scsi/vhost-scsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/scsi/vhost-scsi.c +1 -1
index d7a1c33..785e93f 100644
@@ -123,7 +123,7 @@ static void vhost_scsi_stop(VHostSCSI *s)
     VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
     int ret = 0;
 
-    if (!k->set_guest_notifiers) {
+    if (k->set_guest_notifiers) {
         ret = k->set_guest_notifiers(qbus->parent, s->dev.nvqs, false);
         if (ret < 0) {
                 error_report("vhost guest notifier cleanup failed: %d\n", ret);
Signature · 1 line
1.8.1.4
#2 lore raw

Il 03/06/2013 14:27, Markus Armbruster ha scritto:

Quoted 9 lines
Quoted 4 lines · Paolo Bonzini

The copied code comes from vhost_scsi_start. Spotted by Coverity.

Same as Stefan's [PATCH 1/3] vhost-scsi: fix k->set_guest_notifiers() NULL dereference

Yes, but his commit message makes more fun of the guy who wrote the code. Since I deserve it, I'm applying his version.

Paolo