Searched hist:"0 d424780852eb60467a6f053d92495bb845ac186" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/block/ |
H A D | n64cart.c | diff 0d424780852eb60467a6f053d92495bb845ac186 Mon Jan 25 17:32:42 CST 2021 Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> n64: cleanup n64cart_probe()
The goto label fail_queue is needed to cleanup the queue allocation when devm_platform_ioremap_resource() or alloc_disk() fails, either of these two functions are not dependent on the queue variable which is allocated prior to these calls.
Allocate the queue variable after successful alloc_disk(). Return error directly when devm_platform_ioremap_resource() or alloc_disk() fail. Remove fail_queue label and a call to the blk_cleanup_queue().
Direct return from these two functions allows us to remove the local variable err and allocating queue after alloc_disk() allows us to remove the local variable queue so we use disk->queue directly.
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Reviewed-by: Lauri Kasanen <cand@gmx.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
|