summaryrefslogtreecommitdiff
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2019-11-25 18:26:35 +0200
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2019-12-13 16:48:48 +0200
commita718e68ede16957e091ee8f35f7b73765e51a092 (patch)
tree3ee6aa8fd04ccbd63dbab77df8847620c485e580 /drivers/pinctrl
parentcaedcbd053bca446f8d66faf74adeb8eb3d2913f (diff)
pinctrl: lynxpoint: Use standard pattern for memory allocation
The pattern foo = kmalloc(sizeof(*foo), GFP_KERNEL); has an advantage when foo type is changed. Since we are planning a such, better to be prepared by using standard pattern for memory allocation. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/intel/pinctrl-lynxpoint.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/intel/pinctrl-lynxpoint.c b/drivers/pinctrl/intel/pinctrl-lynxpoint.c
index 36978a7c2a85..17a7843c8dc9 100644
--- a/drivers/pinctrl/intel/pinctrl-lynxpoint.c
+++ b/drivers/pinctrl/intel/pinctrl-lynxpoint.c
@@ -327,7 +327,7 @@ static int lp_gpio_probe(struct platform_device *pdev)
unsigned long reg_len;
int ret;
- lg = devm_kzalloc(dev, sizeof(struct lp_gpio), GFP_KERNEL);
+ lg = devm_kzalloc(dev, sizeof(*lg), GFP_KERNEL);
if (!lg)
return -ENOMEM;