projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
58d1362
)
rbd: fix error return code in rbd_dev_device_setup()
author
Wei Yongjun
<yongjun_wei@trendmicro.com.cn>
Thu, 14 Aug 2014 03:49:52 +0000
(20:49 -0700)
committer
Ilya Dryomov
<ilya.dryomov@inktank.com>
Wed, 10 Sep 2014 07:59:06 +0000
(11:59 +0400)
Fix to return -ENOMEM from the workqueue alloc error handling
case instead of 0, as done elsewhere in this function.
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
drivers/block/rbd.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/block/rbd.c
b/drivers/block/rbd.c
index 2cd01ca1b5b4f48984c0de25d06734367022b511..4b97baf8afa317347ca7ff531f2d8828394084a2 100644
(file)
--- a/
drivers/block/rbd.c
+++ b/
drivers/block/rbd.c
@@
-5088,8
+5088,10
@@
static int rbd_dev_device_setup(struct rbd_device *rbd_dev)
set_disk_ro(rbd_dev->disk, rbd_dev->mapping.read_only);
rbd_dev->rq_wq = alloc_workqueue("%s", 0, 0, rbd_dev->disk->disk_name);
- if (!rbd_dev->rq_wq)
+ if (!rbd_dev->rq_wq) {
+ ret = -ENOMEM;
goto err_out_mapping;
+ }
ret = rbd_bus_add_dev(rbd_dev);
if (ret)