Commit c0ff7e2c authored by Meng Xu's avatar Meng Xu Committed by Martin K. Petersen

scsi: mpt3sas: remove redundant copy_from_user in _ctl_getiocinfo

Since right after the user copy, we are going to memset(&karg, 0,
sizeof(karg)), the copy_from_user is redundant
Signed-off-by: default avatarMeng Xu <mengxu.gatech@gmail.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 08eb7f45
...@@ -1065,12 +1065,6 @@ _ctl_getiocinfo(struct MPT3SAS_ADAPTER *ioc, void __user *arg) ...@@ -1065,12 +1065,6 @@ _ctl_getiocinfo(struct MPT3SAS_ADAPTER *ioc, void __user *arg)
{ {
struct mpt3_ioctl_iocinfo karg; struct mpt3_ioctl_iocinfo karg;
if (copy_from_user(&karg, arg, sizeof(karg))) {
pr_err("failure at %s:%d/%s()!\n",
__FILE__, __LINE__, __func__);
return -EFAULT;
}
dctlprintk(ioc, pr_info(MPT3SAS_FMT "%s: enter\n", ioc->name, dctlprintk(ioc, pr_info(MPT3SAS_FMT "%s: enter\n", ioc->name,
__func__)); __func__));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment