aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/htc-i2cpld.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mfd/htc-i2cpld.c')
-rw-r--r--drivers/mfd/htc-i2cpld.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mfd/htc-i2cpld.c b/drivers/mfd/htc-i2cpld.c
index 4bf8b7781c77..01572b5e79e8 100644
--- a/drivers/mfd/htc-i2cpld.c
+++ b/drivers/mfd/htc-i2cpld.c
@@ -477,7 +477,9 @@ static int htcpld_setup_chips(struct platform_device *pdev)
477 477
478 /* Setup each chip's output GPIOs */ 478 /* Setup each chip's output GPIOs */
479 htcpld->nchips = pdata->num_chip; 479 htcpld->nchips = pdata->num_chip;
480 htcpld->chip = devm_kzalloc(dev, sizeof(struct htcpld_chip) * htcpld->nchips, 480 htcpld->chip = devm_kcalloc(dev,
481 htcpld->nchips,
482 sizeof(struct htcpld_chip),
481 GFP_KERNEL); 483 GFP_KERNEL);
482 if (!htcpld->chip) 484 if (!htcpld->chip)
483 return -ENOMEM; 485 return -ENOMEM;