diff options
author | Meng Xu <mengxu.gatech@gmail.com> | 2017-09-20 11:13:51 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-09-25 19:21:01 -0400 |
commit | c0ff7e2c217d6b367cd0343f14866677f7cf4dc6 (patch) | |
tree | 1776937f5ff6d10429394413cefc80f18c0ea6c2 | |
parent | 08eb7f45de6131a72db7dd82607fd204d0d2bac2 (diff) |
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: Meng Xu <mengxu.gatech@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/mpt3sas/mpt3sas_ctl.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c index bdffb692bded..d448fedca3b9 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c +++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.c @@ -1065,12 +1065,6 @@ _ctl_getiocinfo(struct MPT3SAS_ADAPTER *ioc, void __user *arg) { 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, __func__)); |