Commit bde21f73 authored by Konrad Rzeszutek Wilk's avatar Konrad Rzeszutek Wilk

xen/blocks: Return -EXX instead of -1

Lets return sensible values instead of -1.
Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
parent d4bf0065
...@@ -996,7 +996,7 @@ static int connect_ring(struct backend_info *be) ...@@ -996,7 +996,7 @@ static int connect_ring(struct backend_info *be)
be->blkif->blk_protocol = BLKIF_PROTOCOL_X86_64; be->blkif->blk_protocol = BLKIF_PROTOCOL_X86_64;
else { else {
xenbus_dev_fatal(dev, err, "unknown fe protocol %s", protocol); xenbus_dev_fatal(dev, err, "unknown fe protocol %s", protocol);
return -1; return -ENOSYS;
} }
err = xenbus_gather(XBT_NIL, dev->otherend, err = xenbus_gather(XBT_NIL, dev->otherend,
"feature-persistent", "%u", "feature-persistent", "%u",
......
...@@ -828,11 +828,11 @@ static int xlvbd_init_blk_queue(struct gendisk *gd, u16 sector_size, ...@@ -828,11 +828,11 @@ static int xlvbd_init_blk_queue(struct gendisk *gd, u16 sector_size,
info->tag_set.driver_data = info; info->tag_set.driver_data = info;
if (blk_mq_alloc_tag_set(&info->tag_set)) if (blk_mq_alloc_tag_set(&info->tag_set))
return -1; return -EINVAL;
rq = blk_mq_init_queue(&info->tag_set); rq = blk_mq_init_queue(&info->tag_set);
if (IS_ERR(rq)) { if (IS_ERR(rq)) {
blk_mq_free_tag_set(&info->tag_set); blk_mq_free_tag_set(&info->tag_set);
return -1; return PTR_ERR(rq);
} }
queue_flag_set_unlocked(QUEUE_FLAG_VIRT, rq); queue_flag_set_unlocked(QUEUE_FLAG_VIRT, rq);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment