Skip to content

Commit

Permalink
gpiolib: devres: use correct structure type name in sizeof
Browse files Browse the repository at this point in the history
Correct typo in the name of the type given to sizeof.  Because it is the
size of a pointer that is wanted, the typo has no impact on compilation or
execution.

This problem was found using Coccinelle (http://coccinelle.lip6.fr/).  The
semantic patch used can be found in message 0 of this patch series.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Julia Lawall authored and Linus Walleij committed Aug 17, 2014
1 parent 5e16390 commit 0f05a3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpio/devres.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ struct gpio_desc *__must_check __devm_gpiod_get_index(struct device *dev,
struct gpio_desc **dr;
struct gpio_desc *desc;

dr = devres_alloc(devm_gpiod_release, sizeof(struct gpiod_desc *),
dr = devres_alloc(devm_gpiod_release, sizeof(struct gpio_desc *),
GFP_KERNEL);
if (!dr)
return ERR_PTR(-ENOMEM);
Expand Down

0 comments on commit 0f05a3a

Please sign in to comment.