diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-08-17 13:17:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-08-17 13:17:03 -0400 |
commit | 557e2e2eef90d7d3d4ee5396c1ecee873c3dd46e (patch) | |
tree | 0564981d2766e8b4f9b7bbf7eff12e4ad9b82e97 /drivers/iio/light/adjd_s311.c | |
parent | c83917976fad1e66689f2e4f632841ed2b2dbe2b (diff) | |
parent | 3a491aeae86577e0f23cd094f3e16351b6061209 (diff) |
Merge tag 'staging-3.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging fixes from Greg Kroah-Hartman:
"Here are some staging driver fixes (and iio driver fixes, they get
lumped in with the staging stuff due to dependancies) for your 3.6-rc3
tree.
Nothing major, just a bunch of fixes that people have reported.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
* tag 'staging-3.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (26 commits)
iio: lm3533-als: Fix build warnings
staging:iio:ad7780: Mark channels as unsigned
staging:iio:ad7192: Report offset and scale for temperature channel
staging:iio:ad7192: Report channel offset
staging:iio:ad7192: Mark channels as unsigned
staging:iio:ad7192: Fix setting ACX
staging:iio:ad7192: Add missing break in switch statement
staging:iio:ad7793: Fix internal reference value
staging:iio:ad7793: Follow new IIO naming spec
staging:iio:ad7793: Fix temperature scale and offset
staging:iio:ad7793: Report channel offset
staging:iio:ad7793: Mark channels as unsigned
staging:iio:ad7793: Add missing break in switch statement
iio/adjd_s311: Fix potential memory leak in adjd_s311_update_scan_mode()
iio: frequency: ADF4350: Fix potential reference div factor overflow.
iio: staging: ad7298_ring: Fix maybe-uninitialized warning
staging: comedi: usbduxfast: Declare MODULE_FIRMWARE usage
staging: comedi: usbdux: Declare MODULE_FIRMWARE usage
staging: comedi: usbduxsigma: Declare MODULE_FIRMWARE usage
staging: csr: add INET dependancy
...
Diffstat (limited to 'drivers/iio/light/adjd_s311.c')
-rw-r--r-- | drivers/iio/light/adjd_s311.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/iio/light/adjd_s311.c b/drivers/iio/light/adjd_s311.c index 1cbb449b319a..9a99f43094f0 100644 --- a/drivers/iio/light/adjd_s311.c +++ b/drivers/iio/light/adjd_s311.c | |||
@@ -271,9 +271,10 @@ static int adjd_s311_update_scan_mode(struct iio_dev *indio_dev, | |||
271 | const unsigned long *scan_mask) | 271 | const unsigned long *scan_mask) |
272 | { | 272 | { |
273 | struct adjd_s311_data *data = iio_priv(indio_dev); | 273 | struct adjd_s311_data *data = iio_priv(indio_dev); |
274 | data->buffer = krealloc(data->buffer, indio_dev->scan_bytes, | 274 | |
275 | GFP_KERNEL); | 275 | kfree(data->buffer); |
276 | if (!data->buffer) | 276 | data->buffer = kmalloc(indio_dev->scan_bytes, GFP_KERNEL); |
277 | if (data->buffer == NULL) | ||
277 | return -ENOMEM; | 278 | return -ENOMEM; |
278 | 279 | ||
279 | return 0; | 280 | return 0; |