block/swim: Don't log an error message for an invalid ioctl
authorFinn Thain <fthain@telegraphics.com.au>
Thu, 12 Apr 2018 00:50:14 +0000 (20:50 -0400)
committerJens Axboe <axboe@kernel.dk>
Tue, 17 Apr 2018 03:49:35 +0000 (21:49 -0600)
commit8e2ab5a4efaac77fb93e5b5b109d0b3976fdd3a0
treeb3efe23492206f9afab06a54a6c75ab562ca1d7f
parentc1d6207cc0eef2a7f8551f9c7420d8776268f6e1
block/swim: Don't log an error message for an invalid ioctl

The 'eject' shell command may send various different ioctl commands.
This leads to error messages on the console even though the FDEJECT
ioctl succeeds.

~# eject floppy
SWIM floppy_ioctl: unknown cmd 21257
SWIM floppy_ioctl: unknown cmd 1

Don't log an error message for an invalid ioctl, just do as the
swim3 driver does and return -ENOTTY.

Cc: Laurent Vivier <lvivier@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: stable@vger.kernel.org # v4.14+
Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Acked-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/swim.c