diff options
author | Erick Archer <erick.archer@outlook.com> | 2024-06-02 10:49:22 +0200 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2024-06-04 10:29:36 +0300 |
commit | 632691ad83197227adc902793a2a3e10c04fe9b8 (patch) | |
tree | 092d0888c0632d9c0789c167f05cb5e8974a80cb /drivers/auxdisplay/arm-charlcd.c | |
parent | c56a45064e989998a616aadf88023cc9611416b7 (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/arm-charlcd.c')
-rw-r--r-- | drivers/auxdisplay/arm-charlcd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/auxdisplay/arm-charlcd.c b/drivers/auxdisplay/arm-charlcd.c index 0b1c99cca733..a7eae99a48f7 100644 --- a/drivers/auxdisplay/arm-charlcd.c +++ b/drivers/auxdisplay/arm-charlcd.c @@ -270,7 +270,7 @@ static int __init charlcd_probe(struct platform_device *pdev) struct charlcd *lcd; struct resource *res; - lcd = kzalloc(sizeof(struct charlcd), GFP_KERNEL); + lcd = kzalloc(sizeof(*lcd), GFP_KERNEL); if (!lcd) return -ENOMEM; |