From: Greg Kroah-Hartman Date: Wed, 5 May 2010 05:26:19 +0000 (-0700) Subject: Staging: iio: max1363_core: fix bug in kzalloc call X-Git-Tag: MMI-PSA29.97-13-9~23841^2^2~197 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f03de82b3f10b2e8b7f75f3d4323ec38d131a99c;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git Staging: iio: max1363_core: fix bug in kzalloc call The operands were switched around :( Cc: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/iio/adc/max1363_core.c b/drivers/staging/iio/adc/max1363_core.c index 4a77657285da..905f8560d31f 100644 --- a/drivers/staging/iio/adc/max1363_core.c +++ b/drivers/staging/iio/adc/max1363_core.c @@ -958,9 +958,8 @@ static int __devinit max1363_probe(struct i2c_client *client, } st->indio_dev->available_scan_masks - = kzalloc(GFP_KERNEL, - sizeof(*st->indio_dev->available_scan_masks)* - (st->chip_info->num_modes + 1)); + = kzalloc(sizeof(*st->indio_dev->available_scan_masks)* + (st->chip_info->num_modes + 1), GFP_KERNEL); if (!st->indio_dev->available_scan_masks) { ret = -ENOMEM; goto error_free_device;