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>
Loading
Please register or sign in to comment