Staging: iio: max1363_core: fix bug in kzalloc call
The operands were switched around :( Cc: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
1b183e4b93
commit
f03de82b3f
1 changed files with 2 additions and 3 deletions
|
@ -958,9 +958,8 @@ static int __devinit max1363_probe(struct i2c_client *client,
|
||||||
}
|
}
|
||||||
|
|
||||||
st->indio_dev->available_scan_masks
|
st->indio_dev->available_scan_masks
|
||||||
= kzalloc(GFP_KERNEL,
|
= kzalloc(sizeof(*st->indio_dev->available_scan_masks)*
|
||||||
sizeof(*st->indio_dev->available_scan_masks)*
|
(st->chip_info->num_modes + 1), GFP_KERNEL);
|
||||||
(st->chip_info->num_modes + 1));
|
|
||||||
if (!st->indio_dev->available_scan_masks) {
|
if (!st->indio_dev->available_scan_masks) {
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto error_free_device;
|
goto error_free_device;
|
||||||
|
|
Loading…
Add table
Reference in a new issue