mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-01 18:22:16 -05:00
staging: gpib: switch to kmalloc(sizeof(*status))
Fix checkpatch warning: Prefer kmalloc(sizeof(*status)...) over kmalloc(sizeof(struct gpib_status_byte)...) Signed-off-by: Andreas Kleinbichler <andi.kleinbichler@gmail.com> Link: https://lore.kernel.org/r/aCdY-OgvoTUjcIeF@andreas-VirtualBox Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
5aac95320d
commit
7aca10d57d
@@ -198,7 +198,7 @@ int push_status_byte(struct gpib_board *board, struct gpib_status_queue *device,
|
||||
return retval;
|
||||
}
|
||||
|
||||
status = kmalloc(sizeof(struct gpib_status_byte), GFP_KERNEL);
|
||||
status = kmalloc(sizeof(*status), GFP_KERNEL);
|
||||
if (!status)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user