Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7e026b64 authored by Navya Sri Nizamkari's avatar Navya Sri Nizamkari Committed by Greg Kroah-Hartman
Browse files

staging: iio: Use kcalloc instead of kzalloc.



This patch uses kcalloc instead of kzalloc function.
A coccinelle script was used to make this change.

Signed-off-by: default avatarNavya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3637d77f
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -547,8 +547,9 @@ static int ad7280_attr_init(struct ad7280_state *st)
{
	int dev, ch, cnt;

	st->iio_attr = kzalloc(sizeof(*st->iio_attr) * (st->slave_num + 1) *
				AD7280A_CELLS_PER_DEV * 2, GFP_KERNEL);
	st->iio_attr = kcalloc(2, sizeof(*st->iio_attr) *
			       (st->slave_num + 1) * AD7280A_CELLS_PER_DEV,
			       GFP_KERNEL);
	if (st->iio_attr == NULL)
		return -ENOMEM;