diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-02-11 09:00:48 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-13 20:09:38 -0800 |
commit | 09f993e6844a0cacec2ccff72f04c4fc436a2358 (patch) | |
tree | db7a4c1fd16e7817f8571f245011d8cdf8f64f6d /drivers/staging/iio/dac/ad5380.c | |
parent | 5f01f7f301db567a7a2b99d012db1c408ce0e9de (diff) | |
download | linux-stable-09f993e6844a0cacec2ccff72f04c4fc436a2358.tar.gz linux-stable-09f993e6844a0cacec2ccff72f04c4fc436a2358.tar.bz2 linux-stable-09f993e6844a0cacec2ccff72f04c4fc436a2358.zip |
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: Axel Lin <axel.lin@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/iio/dac/ad5380.c')
-rw-r--r-- | drivers/staging/iio/dac/ad5380.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/iio/dac/ad5380.c b/drivers/staging/iio/dac/ad5380.c index eff97ae05c4b..4c50716fa801 100644 --- a/drivers/staging/iio/dac/ad5380.c +++ b/drivers/staging/iio/dac/ad5380.c @@ -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; |