diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-02-11 01:00:48 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-14 04:09:38 (GMT) |
commit | 09f993e6844a0cacec2ccff72f04c4fc436a2358 (patch) | |
tree | db7a4c1fd16e7817f8571f245011d8cdf8f64f6d /drivers/staging/iio/dac/ad5380.c | |
parent | 5f01f7f301db567a7a2b99d012db1c408ce0e9de (diff) | |
download | linux-09f993e6844a0cacec2ccff72f04c4fc436a2358.tar.xz |
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 eff97ae0..4c50716 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; |