diff options
author | Shawn Lin <shawn.lin@rock-chips.com> | 2016-08-21 04:33:29 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-08-26 04:27:32 +0200 |
commit | 67f251759ea28a1e803deda47de6e37d4857ba69 (patch) | |
tree | 237bbec7d425dea96ef044ac6966b1a6c8f6078e /drivers/scsi/esas2r/esas2r_main.c | |
parent | scsi: megaraid_sas: Use memdup_user() rather than duplicating its implementation (diff) | |
download | linux-67f251759ea28a1e803deda47de6e37d4857ba69.tar.xz linux-67f251759ea28a1e803deda47de6e37d4857ba69.zip |
scsi: esas2r: not need to alloc zero buffer for local_atto_ioctl
We don't need to use kzalloc as we will always memset the
local_atto_ioctl later.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Acked-by: Bradley Grove <bgrove@attotech.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/esas2r/esas2r_main.c')
-rw-r--r-- | drivers/scsi/esas2r/esas2r_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/esas2r/esas2r_main.c b/drivers/scsi/esas2r/esas2r_main.c index 2aca4d16f39e..5092c821d088 100644 --- a/drivers/scsi/esas2r/esas2r_main.c +++ b/drivers/scsi/esas2r/esas2r_main.c @@ -194,7 +194,7 @@ static ssize_t write_hw(struct file *file, struct kobject *kobj, int length = min(sizeof(struct atto_ioctl), count); if (!a->local_atto_ioctl) { - a->local_atto_ioctl = kzalloc(sizeof(struct atto_ioctl), + a->local_atto_ioctl = kmalloc(sizeof(struct atto_ioctl), GFP_KERNEL); if (a->local_atto_ioctl == NULL) { esas2r_log(ESAS2R_LOG_WARN, |