Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pktcdvd: Fix pkt_setup_dev() error path
Commit 523e1d3 ("block: make gendisk hold a reference to its queue") modified add_disk() and disk_release() but did not update any of the error paths that trigger a put_disk() call after disk->queue has been assigned. That introduced the following behavior in the pktcdvd driver if pkt_new_dev() fails: Kernel BUG at 00000000e98fd882 [verbose debug info unavailable] Since disk_release() calls blk_put_queue() anyway if disk->queue != NULL, fix this by removing the blk_cleanup_queue() call from the pkt_setup_dev() error path. Fixes: commit 523e1d3 ("block: make gendisk hold a reference to its queue") Signed-off-by: Bart Van Assche <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Maciej S. Szmigiero <[email protected]> Cc: <[email protected]> # v3.2 Signed-off-by: Jens Axboe <[email protected]>
- Loading branch information