Skip to content

Commit 7aca10d

Browse files
AndiKleinigregkh
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/aCdY-OgvoTUjcIeF@andreas-VirtualBox Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 5aac953 commit 7aca10d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/staging/gpib/common/gpib_os.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ int push_status_byte(struct gpib_board *board, struct gpib_status_queue *device,
198198
return retval;
199199
}
200200

201-
status = kmalloc(sizeof(struct gpib_status_byte), GFP_KERNEL);
201+
status = kmalloc(sizeof(*status), GFP_KERNEL);
202202
if (!status)
203203
return -ENOMEM;
204204

0 commit comments

Comments
 (0)