floppy: properly handle failure on add_disk loop
authorHerton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Mon, 27 Aug 2012 23:56:54 +0000 (20:56 -0300)
committerJens Axboe <axboe@kernel.dk>
Tue, 30 Oct 2012 07:34:25 +0000 (08:34 +0100)
commitd60e7ec18c3fb2cbf90969ccd42889eb2d03aef9
tree05ebf2276e545a301eb3e6db2264254b11c3ae1e
parent238ab78469c6ab7845b43d5061cd3c92331b2452
floppy: properly handle failure on add_disk loop

On floppy initialization, if something failed inside the loop we call
add_disk, there was no cleanup of previous iterations in the error
handling.

Cc: stable@vger.kernel.org
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/floppy.c