Skip to contentSkip to conversation

Staging: ks7010: Use sizeof structure *pointer over sizeof structure in kzalloc()

PATCH New Sandhya Bankar 1 participant 1 message Sep 20, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: ks7010: Use sizeof structure *pointer over sizeof structure in kzalloc()

This issue was found by checkpatch.

---
 drivers/staging/ks7010/ks7010_sdio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/ks7010/ks7010_sdio.c +1 -1
index 25ad43d..37a4ba3 100644
@@ -955,7 +955,7 @@ static int ks7010_sdio_probe(struct sdio_func *func,
 	netdev = NULL;
 
 	/* initilize ks_sdio_card */
-	card = kzalloc(sizeof(struct ks_sdio_card), GFP_KERNEL);
+	card = kzalloc(sizeof(*card), GFP_KERNEL);
 	if (!card)
 		return -ENOMEM;
 
Signature · 1 line
1.7.1