]> git.ipfire.org Git - people/ms/linux.git/commit
IIO: si7020: Allocate correct amount of memory in devm_iio_device_alloc
authorAndrey Smirnov <andrew.smirnov@gmail.com>
Fri, 13 Feb 2015 07:58:41 +0000 (23:58 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Mar 2015 13:10:58 +0000 (14:10 +0100)
commitdc77d1f2ff85e75ff2c9ac3ec462116468f98a63
tree4593b9f7250dbbcbcdc7fe07031ab723fcc656bb
parentf3b2ffcff53dbd5358c04c1d8582dcf5b3421643
IIO: si7020: Allocate correct amount of memory in devm_iio_device_alloc

commit e01becbad300712a28f29b666e685536f45e83bc upstream.

Since only a pointer to struct i2c_client is stored in a private area
of IIO device created by the driver there's no need to allocate
sizeof(struct i2c_client) worth of storage.

Pushed to stable as this is linked to the revert patch previously.
Without this followup the original patch looks sensible.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/humidity/si7020.c