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 <jasonwood2031@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
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