mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
pktcdvd: fix setting of 'ret' error return for a few cases
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 <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
599d067dd3
commit
566484a9e8
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue