aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2018-01-12 13:36:29 -0500
committerLinus Walleij <linus.walleij@linaro.org>2018-01-17 01:44:15 -0500
commit64fec0bcea0faa148151050bbb2c15da6a1423e0 (patch)
treef654e87b4cdfa79eab43c9951879674a47c0117e
parent0d83a5eb65095b84b5b000684407fc171d7872e4 (diff)
gpio: stmpe: Improve a size determination in stmpe_gpio_probe()
Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/gpio/gpio-stmpe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-stmpe.c b/drivers/gpio/gpio-stmpe.c
index 8061c70c4b95..b041c1768ecc 100644
--- a/drivers/gpio/gpio-stmpe.c
+++ b/drivers/gpio/gpio-stmpe.c
@@ -437,7 +437,7 @@ static int stmpe_gpio_probe(struct platform_device *pdev)
437 437
438 irq = platform_get_irq(pdev, 0); 438 irq = platform_get_irq(pdev, 0);
439 439
440 stmpe_gpio = kzalloc(sizeof(struct stmpe_gpio), GFP_KERNEL); 440 stmpe_gpio = kzalloc(sizeof(*stmpe_gpio), GFP_KERNEL);
441 if (!stmpe_gpio) 441 if (!stmpe_gpio)
442 return -ENOMEM; 442 return -ENOMEM;
443 443