From: Dave Jones Date: Thu, 29 May 2014 19:11:30 +0000 (-0400) Subject: block: remove dead code in scsi_ioctl:blk_verify_command X-Git-Tag: v3.16-rc1~30^2~49^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=da52f22fa924b4a21d8e11fbfd3eeebd7a90a366;p=platform%2Fkernel%2Flinux-exynos.git block: remove dead code in scsi_ioctl:blk_verify_command filter gets assigned the address of blk_default_cmd_filter on entry to this function, so the !filter condition can never be true. Signed-off-by: Dave Jones Signed-off-by: Jens Axboe --- diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c index 2648797..9c28a5b 100644 --- a/block/scsi_ioctl.c +++ b/block/scsi_ioctl.c @@ -205,10 +205,6 @@ int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm) if (capable(CAP_SYS_RAWIO)) return 0; - /* if there's no filter set, assume we're filtering everything out */ - if (!filter) - return -EPERM; - /* Anybody who can open the device can do a read-safe command */ if (test_bit(cmd[0], filter->read_ok)) return 0;