diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-01-17 08:13:45 +1300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-01-17 08:13:45 +1300 |
commit | 937102fede1ad4943a3c3559b28468713370d7f9 (patch) | |
tree | 46b0902554854e2cf5bd73e66c8ffe89667d4cbb /drivers/iio/inkern.c | |
parent | 79600d4bba783147758cdb0e636010fbe02a843f (diff) | |
parent | a307d1d6d4cf66723a395785fd4c5998fe922b61 (diff) |
Merge tag 'staging-3.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging driver fixes from Greg KH:
"Here are 6 staging driver fixes for 3.19-rc5.
They fix some reported issues with some IIO drivers, as well as some
issues with the vt6655 wireless driver.
All have been in linux-next for a while"
* tag 'staging-3.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
staging: vt6655: fix sparse warning: argument type
staging: vt6655: Fix loss of distant/weak access points on channel change.
staging: vt6655: vnt_tx_packet Fix corrupted tx packets.
staging: vt6655: fix sparse warnings: incorrect argument type
iio: iio: Fix iio_channel_read return if channel havn't info
iio: ad799x: Fix ad7991/ad7995/ad7999 config setup
Diffstat (limited to 'drivers/iio/inkern.c')
-rw-r--r-- | drivers/iio/inkern.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c index 866fe904cba2..90c8cb727cc7 100644 --- a/drivers/iio/inkern.c +++ b/drivers/iio/inkern.c @@ -449,6 +449,9 @@ static int iio_channel_read(struct iio_channel *chan, int *val, int *val2, if (val2 == NULL) val2 = &unused; + if(!iio_channel_has_info(chan->channel, info)) + return -EINVAL; + if (chan->indio_dev->info->read_raw_multi) { ret = chan->indio_dev->info->read_raw_multi(chan->indio_dev, chan->channel, INDIO_MAX_RAW_ELEMENTS, |