aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/core.c6
-rw-r--r--drivers/pinctrl/pinmux.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index 1d5943069a03..2cc8f727aedf 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -502,7 +502,7 @@ static struct pinctrl *pinctrl_get_locked(struct device *dev, const char *name)
502 * mapping, this is what consumers will get when requesting 502 * mapping, this is what consumers will get when requesting
503 * a pin control handle with pinctrl_get() 503 * a pin control handle with pinctrl_get()
504 */ 504 */
505 p = kzalloc(sizeof(struct pinctrl), GFP_KERNEL); 505 p = kzalloc(sizeof(*p), GFP_KERNEL);
506 if (p == NULL) { 506 if (p == NULL) {
507 dev_err(dev, "failed to alloc struct pinctrl\n"); 507 dev_err(dev, "failed to alloc struct pinctrl\n");
508 return ERR_PTR(-ENOMEM); 508 return ERR_PTR(-ENOMEM);
@@ -726,7 +726,7 @@ static int pinctrl_hog_map(struct pinctrl_dev *pctldev,
726 struct pinctrl *p; 726 struct pinctrl *p;
727 int ret; 727 int ret;
728 728
729 hog = kzalloc(sizeof(struct pinctrl_hog), GFP_KERNEL); 729 hog = kzalloc(sizeof(*hog), GFP_KERNEL);
730 if (!hog) { 730 if (!hog) {
731 dev_err(pctldev->dev, "failed to alloc struct pinctrl_hog\n"); 731 dev_err(pctldev->dev, "failed to alloc struct pinctrl_hog\n");
732 return -ENOMEM; 732 return -ENOMEM;
@@ -1160,7 +1160,7 @@ struct pinctrl_dev *pinctrl_register(struct pinctrl_desc *pctldesc,
1160 if (pctldesc->name == NULL) 1160 if (pctldesc->name == NULL)
1161 return NULL; 1161 return NULL;
1162 1162
1163 pctldev = kzalloc(sizeof(struct pinctrl_dev), GFP_KERNEL); 1163 pctldev = kzalloc(sizeof(*pctldev), GFP_KERNEL);
1164 if (pctldev == NULL) { 1164 if (pctldev == NULL) {
1165 dev_err(dev, "failed to alloc struct pinctrl_dev\n"); 1165 dev_err(dev, "failed to alloc struct pinctrl_dev\n");
1166 return NULL; 1166 return NULL;
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,
491 p->func_selector = func_selector; 491 p->func_selector = func_selector;
492 492
493 /* Now add this group selector, we may have many of them */ 493 /* Now add this group selector, we may have many of them */
494 grp = kmalloc(sizeof(struct pinmux_group), GFP_KERNEL); 494 grp = kmalloc(sizeof(*grp), GFP_KERNEL);
495 if (!grp) 495 if (!grp)
496 return -ENOMEM; 496 return -ENOMEM;
497 grp->group_selector = group_selector; 497 grp->group_selector = group_selector;