summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/pinmux.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-02-22 14:26:00 -0700
committerLinus Walleij <linus.walleij@linaro.org>2012-02-24 06:28:56 +0100
commit02f5b98951c631a3c4b3cc398dd2b14d274a6155 (patch)
tree357c026f464d5790833630eac6ac9bc78d4d2bf9 /drivers/pinctrl/pinmux.c
parent95dcd4aea57f1d449305f3032240bba0a839593b (diff)
pinctrl: allocate sizeof(*p) instead of sizeof(struct foo)
This hopefully makes it harder to take the sizeof the wrong type. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Dong Aisheng <dong.aisheng@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinmux.c')
-rw-r--r--drivers/pinctrl/pinmux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c
index 288789750f96..98b89d6cffb0 100644
--- a/drivers/pinctrl/pinmux.c
+++ b/drivers/pinctrl/pinmux.c
@@ -491,7 +491,7 @@ static int pinmux_enable_muxmap(struct pinctrl_dev *pctldev,
p->func_selector = func_selector;
/* Now add this group selector, we may have many of them */
- grp = kmalloc(sizeof(struct pinmux_group), GFP_KERNEL);
+ grp = kmalloc(sizeof(*grp), GFP_KERNEL);
if (!grp)
return -ENOMEM;
grp->group_selector = group_selector;