diff options
author | Andreas Kleinbichler <andi.kleinbichler@gmail.com> | 2025-05-16 17:25:44 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-05-21 13:45:02 +0200 |
commit | 7aca10d57deb658daebe9d18f45587f774fb149d (patch) | |
tree | a1afd61a381f11da7b2864c0ebe80961d72152ec | |
parent | 5aac95320d0f17f1098960e903ce5e087f42bc70 (diff) |
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>
-rw-r--r-- | drivers/staging/gpib/common/gpib_os.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c index d87025aadccc..0678829ad14f 100644 --- a/drivers/staging/gpib/common/gpib_os.c +++ b/drivers/staging/gpib/common/gpib_os.c @@ -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; |