Commit c1c008cc55ab917923871db6bb461b903e9e1f76
Exists in
smarc-imx_3.14.28_1.0.0_ga
and in
1 other branch
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
Showing 2 changed files Side-by-side Diff
drivers/iio/light/adjd_s311.c
... | ... | @@ -232,7 +232,8 @@ |
232 | 232 | |
233 | 233 | switch (mask) { |
234 | 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 | 237 | if (ret < 0) |
237 | 238 | return ret; |
238 | 239 | return IIO_VAL_INT; |
drivers/staging/comedi/drivers.c
... | ... | @@ -482,7 +482,7 @@ |
482 | 482 | ret = comedi_device_postconfig(dev); |
483 | 483 | if (ret < 0) { |
484 | 484 | comedi_device_detach(dev); |
485 | - module_put(dev->driver->module); | |
485 | + module_put(driv->module); | |
486 | 486 | } |
487 | 487 | /* On success, the driver module count has been incremented. */ |
488 | 488 | return ret; |