mirror of
https://github.com/torvalds/linux.git
synced 2026-05-19 04:14:05 +02: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:
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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user