swim: Add missing spinlock init
authorJean Delvare <khali@linux-fr.org>
Thu, 6 Sep 2012 11:48:30 +0000 (13:48 +0200)
committerGeert Uytterhoeven <geert@linux-m68k.org>
Sat, 9 Feb 2013 13:23:33 +0000 (14:23 +0100)
It doesn't seem this spinlock was properly initialized.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Finn Thain <fthain@telegraphics.com.au>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
drivers/block/swim.c

index 765fa2b..8766a22 100644 (file)
@@ -844,6 +844,7 @@ static int swim_floppy_init(struct swim_priv *swd)
                swd->unit[drive].swd = swd;
        }
 
+       spin_lock_init(&swd->lock);
        swd->queue = blk_init_queue(do_fd_request, &swd->lock);
        if (!swd->queue) {
                err = -ENOMEM;