Skip to content

Commit

Permalink
staging:iio:adc:max1363 incorrect allocation of available_scanmasks
Browse files Browse the repository at this point in the history
Longs are not known for being 8 bits.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Oct 17, 2011
1 parent d2fffd6 commit 9c95e01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/iio/adc/max1363_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1271,7 +1271,7 @@ static int __devinit max1363_probe(struct i2c_client *client,
st->client = client;

indio_dev->available_scan_masks
= kzalloc(BITS_TO_LONGS(MAX1363_MAX_CHANNELS)*
= kzalloc(BITS_TO_LONGS(MAX1363_MAX_CHANNELS)*sizeof(long)*
(st->chip_info->num_modes + 1), GFP_KERNEL);
if (!indio_dev->available_scan_masks) {
ret = -ENOMEM;
Expand Down

0 comments on commit 9c95e01

Please sign in to comment.