Files
linux/drivers/iio/adc
Manfred Schlaegl 41be6a0d5a iio: mcp320x: Fix NULL pointer dereference
On reading in_voltage_scale of we got an NULL pointer dereference Oops.

The reason for this is, that mcp320x_read_raw tries to access
chip_info->resolution from struct mcp320x, but chip_info is never set.

chip_info was never set since the driver was added, but there was no
acute problem, because it was not referenced.
The acute problem exists since
b12206e917
iio: adc: mcp320x. Add support for more ADCs

This patch fixes the issue by setting chip_info in mcp320x_probe.

Signed-off-by: Manfred Schlaegl <[email protected]>
Reviewed-by: Michael Welling <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
2015-07-19 13:58:51 +01:00
..
…
…
…
…
…
…
2015-05-23 10:47:40 +01:00
2015-05-23 10:47:40 +01:00
…
…