From: Finn Thain Date: Thu, 12 Apr 2018 00:50:14 +0000 (-0400) Subject: block/swim: Remove extra put_disk() call from error path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f359e87feb8859f687e43bb99f52e566ee82b347;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git block/swim: Remove extra put_disk() call from error path commit c1d6207cc0eef2a7f8551f9c7420d8776268f6e1 upstream. Cc: Laurent Vivier Cc: Jens Axboe Cc: stable@vger.kernel.org # v4.14+ Fixes: 103db8b2dfa5 ("[PATCH] swim: stop sharing request queue across multiple gendisks") Tested-by: Stan Johnson Signed-off-by: Finn Thain Acked-by: Laurent Vivier Reviewed-by: Geert Uytterhoeven Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/block/swim.c b/drivers/block/swim.c index 095f22acd709..3b3e5b134e2a 100644 --- a/drivers/block/swim.c +++ b/drivers/block/swim.c @@ -858,7 +858,6 @@ static int swim_floppy_init(struct swim_priv *swd) &swd->lock); if (!swd->unit[drive].disk->queue) { err = -ENOMEM; - put_disk(swd->unit[drive].disk); goto exit_put_disks; } blk_queue_bounce_limit(swd->unit[drive].disk->queue,