projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
599d067
)
pktcdvd: fix setting of 'ret' error return for a few cases
author
Jens Axboe
<axboe@kernel.dk>
Thu, 16 Aug 2018 20:09:28 +0000
(14:09 -0600)
committer
Jens Axboe
<axboe@kernel.dk>
Thu, 16 Aug 2018 20:09:28 +0000
(14:09 -0600)
We initialize it to -ENOMEM, but then later overwrite it. After
overwriting, we don't set it again for two later failure cases.
Reported-by: Jason Wood <jasonwood2031@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/pktcdvd.c
patch
|
blob
|
history
diff --git
a/drivers/block/pktcdvd.c
b/drivers/block/pktcdvd.c
index e285413d4a7510f63ad670921628cab8e904a6a6..6f1d25c1eb640b8a0cffe94c3bd7e0cfa0ea691b 100644
(file)
--- a/
drivers/block/pktcdvd.c
+++ b/
drivers/block/pktcdvd.c
@@
-2740,6
+2740,7
@@
static int pkt_setup_dev(dev_t dev, dev_t* pkt_dev)
pd->write_congestion_on = write_congestion_on;
pd->write_congestion_off = write_congestion_off;
+ ret = -ENOMEM;
disk = alloc_disk(1);
if (!disk)
goto out_mem;