diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-08-25 15:44:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-08-25 15:44:15 -0400 |
commit | c1c008cc55ab917923871db6bb461b903e9e1f76 (patch) | |
tree | 4106f63211fed084e674bb69af0779eb5781039e | |
parent | 5e25e4f304ce53004dcd01725938c0bc45c75d35 (diff) | |
parent | 3955dfa8216f712bc204a5ad2f4e51efff252fde (diff) |
Merge tag 'staging-3.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging fixes from Greg KH:
"Here are two tiny staging tree fixes (well, one is for an iio driver,
but those updates come through the staging tree due to dependancies)
One fixes a problem with an IIO driver, and the other fixes a bug in
the comedi driver core"
* tag 'staging-3.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
staging: comedi: bug-fix NULL pointer dereference on failed attach
iio: adjd_s311: Fix non-scan mode data read
-rw-r--r-- | drivers/iio/light/adjd_s311.c | 3 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/iio/light/adjd_s311.c b/drivers/iio/light/adjd_s311.c index 5f4749e60b04..c1cd5698b8ae 100644 --- a/drivers/iio/light/adjd_s311.c +++ b/drivers/iio/light/adjd_s311.c | |||
@@ -232,7 +232,8 @@ static int adjd_s311_read_raw(struct iio_dev *indio_dev, | |||
232 | 232 | ||
233 | switch (mask) { | 233 | switch (mask) { |
234 | case IIO_CHAN_INFO_RAW: | 234 | case IIO_CHAN_INFO_RAW: |
235 | ret = adjd_s311_read_data(indio_dev, chan->address, val); | 235 | ret = adjd_s311_read_data(indio_dev, |
236 | ADJD_S311_DATA_REG(chan->address), val); | ||
236 | if (ret < 0) | 237 | if (ret < 0) |
237 | return ret; | 238 | return ret; |
238 | return IIO_VAL_INT; | 239 | return IIO_VAL_INT; |
diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c index e25eba5713c1..b3b5125faa72 100644 --- a/drivers/staging/comedi/drivers.c +++ b/drivers/staging/comedi/drivers.c | |||
@@ -482,7 +482,7 @@ int comedi_device_attach(struct comedi_device *dev, struct comedi_devconfig *it) | |||
482 | ret = comedi_device_postconfig(dev); | 482 | ret = comedi_device_postconfig(dev); |
483 | if (ret < 0) { | 483 | if (ret < 0) { |
484 | comedi_device_detach(dev); | 484 | comedi_device_detach(dev); |
485 | module_put(dev->driver->module); | 485 | module_put(driv->module); |
486 | } | 486 | } |
487 | /* On success, the driver module count has been incremented. */ | 487 | /* On success, the driver module count has been incremented. */ |
488 | return ret; | 488 | return ret; |