summaryrefslogtreecommitdiffstats
path: root/drivers/iio/multiplexer/iio-mux.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iio/multiplexer/iio-mux.c')
-rw-r--r--drivers/iio/multiplexer/iio-mux.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/iio/multiplexer/iio-mux.c b/drivers/iio/multiplexer/iio-mux.c
index 60621ccd67e4..e1f44cecdef4 100644
--- a/drivers/iio/multiplexer/iio-mux.c
+++ b/drivers/iio/multiplexer/iio-mux.c
@@ -281,9 +281,10 @@ static int mux_configure_channel(struct device *dev, struct mux *mux,
if (!page)
return -ENOMEM;
}
- child->ext_info_cache = devm_kzalloc(dev,
- sizeof(*child->ext_info_cache) *
- num_ext_info, GFP_KERNEL);
+ child->ext_info_cache = devm_kcalloc(dev,
+ num_ext_info,
+ sizeof(*child->ext_info_cache),
+ GFP_KERNEL);
if (!child->ext_info_cache)
return -ENOMEM;