2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-25 21:54:06 +08:00

cxlflash: get rid of pointless access_ok()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro 2017-09-29 13:58:09 -04:00
parent 0db188f96b
commit a0dbef3386

View File

@ -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;