[PATCH] drivers:staging:gdm724x Fix Prefer kmalloc(sizeof(*gdm)...)

From: Bogicevic Sasa
Date: Fri Oct 30 2015 - 11:23:31 EST


This fixes Prefer kmalloc(sizeof(*gdm)...) over
kmalloc(sizeof(struct gdm)...) message from checkpatch.pl

Signed-off-by: Bogicevic Sasa <brutallesale@xxxxxxxxx>
---
drivers/staging/gdm724x/gdm_tty.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c
index 85206ef..d600728 100644
--- a/drivers/staging/gdm724x/gdm_tty.c
+++ b/drivers/staging/gdm724x/gdm_tty.c
@@ -225,7 +225,7 @@ int register_lte_tty_device(struct tty_dev *tty_dev, struct device *device)
int j;

for (i = 0; i < TTY_MAX_COUNT; i++) {
- gdm = kmalloc(sizeof(struct gdm), GFP_KERNEL);
+ gdm = kmalloc(sizeof(*gdm), GFP_KERNEL);
if (!gdm)
return -ENOMEM;

--
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/