From: Al Viro Date: Fri, 29 Sep 2017 17:58:09 +0000 (-0400) Subject: cxlflash: get rid of pointless access_ok() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=a0dbef33863349de5313dff62982d309ded98190;p=openwrt%2Fstaging%2Fblogic.git cxlflash: get rid of pointless access_ok() Signed-off-by: Al Viro --- diff --git a/drivers/scsi/cxlflash/main.c b/drivers/scsi/cxlflash/main.c index 76b8b7eed0c0..39430c67b522 100644 --- a/drivers/scsi/cxlflash/main.c +++ b/drivers/scsi/cxlflash/main.c @@ -3383,12 +3383,6 @@ static int cxlflash_afu_debug(struct cxlflash_cfg *cfg, goto out; } - if (unlikely(!access_ok(is_write ? VERIFY_READ : VERIFY_WRITE, - ubuf, ulen))) { - rc = -EFAULT; - goto out; - } - buf = kmalloc(ulen + cache_line_size() - 1, GFP_KERNEL); if (unlikely(!buf)) { rc = -ENOMEM;