]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
xen/blocks: Return -EXX instead of -1
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 25 Nov 2015 18:07:39 +0000 (13:07 -0500)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 10 May 2016 20:27:08 +0000 (22:27 +0200)
Lets return sensible values instead of -1.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
(cherry picked from commit bde21f73b9be146fda0c689f2724cda9d7737565)
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
drivers/block/xen-blkback/xenbus.c
drivers/block/xen-blkfront.c

index 2b8650a9a6a9087f6436d19553a2c24712f5f532..ca3a414de11c0ba1da89498235ce67cc0e41546e 100644 (file)
@@ -996,7 +996,7 @@ static int connect_ring(struct backend_info *be)
                be->blkif->blk_protocol = BLKIF_PROTOCOL_X86_64;
        else {
                xenbus_dev_fatal(dev, err, "unknown fe protocol %s", protocol);
-               return -1;
+               return -ENOSYS;
        }
        err = xenbus_gather(XBT_NIL, dev->otherend,
                            "feature-persistent", "%u",
index 92c49778dd31d5079c3e81de43495d026aad7ff5..3bfa8aa7eb12753454b2f43812a8a3860003e58a 100644 (file)
@@ -829,11 +829,11 @@ static int xlvbd_init_blk_queue(struct gendisk *gd, u16 sector_size,
        info->tag_set.driver_data = info;
 
        if (blk_mq_alloc_tag_set(&info->tag_set))
-               return -1;
+               return -EINVAL;
        rq = blk_mq_init_queue(&info->tag_set);
        if (IS_ERR(rq)) {
                blk_mq_free_tag_set(&info->tag_set);
-               return -1;
+               return PTR_ERR(rq);
        }
 
        queue_flag_set_unlocked(QUEUE_FLAG_VIRT, rq);