Commit 566484a9 authored by Jens Axboe's avatar Jens Axboe

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: default avatarJason Wood <jasonwood2031@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 599d067d
...@@ -2740,6 +2740,7 @@ static int pkt_setup_dev(dev_t dev, dev_t* pkt_dev) ...@@ -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_on = write_congestion_on;
pd->write_congestion_off = write_congestion_off; pd->write_congestion_off = write_congestion_off;
ret = -ENOMEM;
disk = alloc_disk(1); disk = alloc_disk(1);
if (!disk) if (!disk)
goto out_mem; goto out_mem;
......
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