scsi: esas2r: not need to alloc zero buffer for local_atto_ioctl
authorShawn Lin <shawn.lin@rock-chips.com>
Sun, 21 Aug 2016 02:33:29 +0000 (10:33 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 26 Aug 2016 02:27:32 +0000 (22:27 -0400)
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>
drivers/scsi/esas2r/esas2r_main.c

index 2aca4d1..5092c82 100644 (file)
@@ -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,