forked from Minki/linux
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>
This commit is contained in:
parent
caedcbd053
commit
a718e68ede
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user