[<prev] [next>] [day] [month] [year] [list]
Message-ID: <aCdY-OgvoTUjcIeF@andreas-VirtualBox>
Date: Fri, 16 May 2025 17:25:44 +0200
From: Andreas Kleinbichler <andi.kleinbichler@...il.com>
To: Dave Penkler <dpenkler@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: [PATCH] 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@...il.com>
---
drivers/staging/gpib/common/gpib_os.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
--
2.43.0
Powered by blists - more mailing lists