diff options
Diffstat (limited to 'drivers/hsi')
-rw-r--r-- | drivers/hsi/clients/nokia-modem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hsi/clients/nokia-modem.c b/drivers/hsi/clients/nokia-modem.c index c000780d931f..f6c97a0e1fcd 100644 --- a/drivers/hsi/clients/nokia-modem.c +++ b/drivers/hsi/clients/nokia-modem.c @@ -102,8 +102,8 @@ static int nokia_modem_gpio_probe(struct device *dev) return -EINVAL; } - modem->gpios = devm_kzalloc(dev, gpio_count * - sizeof(struct nokia_modem_gpio), GFP_KERNEL); + modem->gpios = devm_kcalloc(dev, gpio_count, sizeof(*modem->gpios), + GFP_KERNEL); if (!modem->gpios) { dev_err(dev, "Could not allocate memory for gpios\n"); return -ENOMEM; |