Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;