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

Commit 09f993e6 authored by Axel Lin's avatar Axel Lin Committed by Greg Kroah-Hartman
Browse files

staging:iio:dac: Fix kcalloc parameters swapped



The first parameter should be "number of elements" and the second parameter
should be "element size".

Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Acked-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5f01f7f3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -439,8 +439,8 @@ static int __devinit ad5360_alloc_channels(struct iio_dev *indio_dev)
	struct iio_chan_spec *channels;
	unsigned int i;

	channels = kcalloc(sizeof(struct iio_chan_spec),
			st->chip_info->num_channels, GFP_KERNEL);
	channels = kcalloc(st->chip_info->num_channels,
			   sizeof(struct iio_chan_spec), GFP_KERNEL);

	if (!channels)
		return -ENOMEM;
+2 −2
Original line number Diff line number Diff line
@@ -363,8 +363,8 @@ static int __devinit ad5380_alloc_channels(struct iio_dev *indio_dev)
	struct iio_chan_spec *channels;
	unsigned int i;

	channels = kcalloc(sizeof(struct iio_chan_spec),
			st->chip_info->num_channels, GFP_KERNEL);
	channels = kcalloc(st->chip_info->num_channels,
			   sizeof(struct iio_chan_spec), GFP_KERNEL);

	if (!channels)
		return -ENOMEM;