xen/pvcalls: remove redundant check for irq >= 0
authorColin Ian King <colin.king@canonical.com>
Fri, 3 Nov 2017 09:20:47 +0000 (09:20 +0000)
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>
Fri, 3 Nov 2017 15:38:45 +0000 (11:38 -0400)
This is a moot point, but irq is always less than zero at the label
out_error, so the check for irq >= 0 is redundant and can be removed.

Detected by CoverityScan, CID#1460371 ("Logically dead code")

Fixes: cb1c7d9bbc87 ("xen/pvcalls: implement connect command")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
drivers/xen/pvcalls-front.c

index 60a0ad8..2925b2f 100644 (file)
@@ -351,9 +351,7 @@ static int create_active(struct sock_mapping *map, int *evtchn)
        return 0;
 
 out_error:
-       if (irq >= 0)
-               unbind_from_irqhandler(irq, map);
-       else if (*evtchn >= 0)
+       if (*evtchn >= 0)
                xenbus_free_evtchn(pvcalls_front_dev, *evtchn);
        kfree(map->active.data.in);
        kfree(map->active.ring);