From 617a0c7177195a5cef6f0c2e559ee05b5d4191dd Mon Sep 17 00:00:00 2001 From: anish kumar Date: Thu, 19 May 2011 20:58:51 +0530 Subject: [PATCH] Staging: sm7xx: preferred form for passing a size to memory allocation routines The preferred form for passing a size of a struct is the following: p = kmalloc(sizeof(*p), ...); Please refer Documentation/Codingstyle chapter 14 Signed-off-by: anish kumar Acked-by: Harry Wei Signed-off-by: Greg Kroah-Hartman --- drivers/staging/sm7xx/smtcfb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/sm7xx/smtcfb.c b/drivers/staging/sm7xx/smtcfb.c index 1aca0cb40caf..c41d2f71a79c 100644 --- a/drivers/staging/sm7xx/smtcfb.c +++ b/drivers/staging/sm7xx/smtcfb.c @@ -714,7 +714,7 @@ static struct smtcfb_info *smtc_alloc_fb_info(struct pci_dev *dev, { struct smtcfb_info *sfb; - sfb = kzalloc(sizeof(struct smtcfb_info), GFP_KERNEL); + sfb = kzalloc(sizeof(*sfb), GFP_KERNEL); if (!sfb) return NULL; -- 2.30.2