diff options
author | Peter Huewe | 2013-01-21 22:14:00 +0100 |
---|---|---|
committer | Jonathan Cameron | 2013-01-26 11:07:53 +0100 |
commit | 232827fb8168d07844a589f0d4991afab16a23ea (patch) | |
tree | 4ffd5fb0b6bcca7b5292cf8a5be12abe312fc833 /drivers/staging/iio | |
parent | iio:accel:kxsd9 move out of staging (diff) | |
download | kernel-qcow2-linux-232827fb8168d07844a589f0d4991afab16a23ea.tar.gz kernel-qcow2-linux-232827fb8168d07844a589f0d4991afab16a23ea.tar.xz kernel-qcow2-linux-232827fb8168d07844a589f0d4991afab16a23ea.zip |
staging/iio: Use correct argument for sizeof
found with coccicheck
sizeof when applied to a pointer typed expression gives the size of
the pointer
The semantic patch that makes this output is available
in scripts/coccinelle/misc/noderef.cocci.
More information about semantic patching is available at
http://coccinelle.lip6.fr/
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/staging/iio')
-rw-r--r-- | drivers/staging/iio/iio_hwmon.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/iio/iio_hwmon.c b/drivers/staging/iio/iio_hwmon.c index c7a5f97576c7..97ad645bb15a 100644 --- a/drivers/staging/iio/iio_hwmon.c +++ b/drivers/staging/iio/iio_hwmon.c @@ -93,7 +93,7 @@ static int iio_hwmon_probe(struct platform_device *pdev) while (st->channels[st->num_channels].indio_dev) st->num_channels++; - st->attrs = kzalloc(sizeof(st->attrs) * (st->num_channels + 1), + st->attrs = kzalloc(sizeof(*st->attrs) * (st->num_channels + 1), GFP_KERNEL); if (st->attrs == NULL) { ret = -ENOMEM; |