Commit 632691ad authored by Erick Archer's avatar Erick Archer Committed by Andy Shevchenko

auxdisplay: Use sizeof(*pointer) instead of sizeof(type)

It is preferred to use sizeof(*pointer) instead of sizeof(type)
due to the type of the variable can change and one needs not
change the former (unlike the latter). This patch has no effect
on runtime behavior.
Signed-off-by: default avatarErick Archer <erick.archer@outlook.com>
Reviewed-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
parent c56a4506
...@@ -270,7 +270,7 @@ static int __init charlcd_probe(struct platform_device *pdev) ...@@ -270,7 +270,7 @@ static int __init charlcd_probe(struct platform_device *pdev)
struct charlcd *lcd; struct charlcd *lcd;
struct resource *res; struct resource *res;
lcd = kzalloc(sizeof(struct charlcd), GFP_KERNEL); lcd = kzalloc(sizeof(*lcd), GFP_KERNEL);
if (!lcd) if (!lcd)
return -ENOMEM; return -ENOMEM;
......
...@@ -230,7 +230,7 @@ static int hd44780_probe(struct platform_device *pdev) ...@@ -230,7 +230,7 @@ static int hd44780_probe(struct platform_device *pdev)
if (!lcd) if (!lcd)
goto fail1; goto fail1;
hd = kzalloc(sizeof(struct hd44780), GFP_KERNEL); hd = kzalloc(sizeof(*hd), GFP_KERNEL);
if (!hd) if (!hd)
goto fail2; goto fail2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment