summaryrefslogtreecommitdiff
path: root/drivers/auxdisplay/hd44780.c
diff options
context:
space:
mode:
authorErick Archer <erick.archer@outlook.com>2024-06-02 10:49:22 +0200
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2024-06-04 10:29:36 +0300
commit632691ad83197227adc902793a2a3e10c04fe9b8 (patch)
tree092d0888c0632d9c0789c167f05cb5e8974a80cb /drivers/auxdisplay/hd44780.c
parentc56a45064e989998a616aadf88023cc9611416b7 (diff)
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: Erick Archer <erick.archer@outlook.com> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/auxdisplay/hd44780.c')
-rw-r--r--drivers/auxdisplay/hd44780.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/auxdisplay/hd44780.c b/drivers/auxdisplay/hd44780.c
index 7ac0b1b1d548..025dc6855cb2 100644
--- a/drivers/auxdisplay/hd44780.c
+++ b/drivers/auxdisplay/hd44780.c
@@ -230,7 +230,7 @@ static int hd44780_probe(struct platform_device *pdev)
if (!lcd)
goto fail1;
- hd = kzalloc(sizeof(struct hd44780), GFP_KERNEL);
+ hd = kzalloc(sizeof(*hd), GFP_KERNEL);
if (!hd)
goto fail2;