From: Konrad Rzeszutek Wilk Date: Wed, 25 Nov 2015 18:07:39 +0000 (-0500) Subject: xen/blocks: Return -EXX instead of -1 X-Git-Tag: v4.5-rc1~28^2~1^2~7 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bde21f73b9be146fda0c689f2724cda9d7737565;p=karo-tx-linux.git xen/blocks: Return -EXX instead of -1 Lets return sensible values instead of -1. Signed-off-by: Konrad Rzeszutek Wilk --- diff --git a/drivers/block/xen-blkback/xenbus.c b/drivers/block/xen-blkback/xenbus.c index 2b8650a9a6a9..ca3a414de11c 100644 --- a/drivers/block/xen-blkback/xenbus.c +++ b/drivers/block/xen-blkback/xenbus.c @@ -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", diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 8b0f3d92d8b4..ef5ce43e307a 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -828,11 +828,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);