Staging fixes for 3.11-rc7
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. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (GNU/Linux) iEYEABECAAYFAlIaSHgACgkQMUfUDdst+ykJsACgtiD3G2UFK6hwqvaiVKbT39E7 pNAAn32Q47GWkTLsrKlIWqOwhpnMb+mi =8lmn -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
c1c008cc55
2 changed files with 3 additions and 2 deletions
|
@ -232,7 +232,8 @@ static int adjd_s311_read_raw(struct iio_dev *indio_dev,
|
||||||
|
|
||||||
switch (mask) {
|
switch (mask) {
|
||||||
case IIO_CHAN_INFO_RAW:
|
case IIO_CHAN_INFO_RAW:
|
||||||
ret = adjd_s311_read_data(indio_dev, chan->address, val);
|
ret = adjd_s311_read_data(indio_dev,
|
||||||
|
ADJD_S311_DATA_REG(chan->address), val);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
return IIO_VAL_INT;
|
return IIO_VAL_INT;
|
||||||
|
|
|
@ -482,7 +482,7 @@ int comedi_device_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||||
ret = comedi_device_postconfig(dev);
|
ret = comedi_device_postconfig(dev);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
comedi_device_detach(dev);
|
comedi_device_detach(dev);
|
||||||
module_put(dev->driver->module);
|
module_put(driv->module);
|
||||||
}
|
}
|
||||||
/* On success, the driver module count has been incremented. */
|
/* On success, the driver module count has been incremented. */
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Add table
Reference in a new issue