mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
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>
This commit is contained in:
parent
709ab231f8
commit
67f251759e
1 changed files with 1 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue