summaryrefslogtreecommitdiff
path: root/block/bsg-lib.c
diff options
context:
space:
mode:
authorManfred Schlaegl <manfred.schlaegl@gmx.at>2015-07-10 20:55:30 (GMT)
committerJonathan Cameron <jic23@kernel.org>2015-07-19 12:58:51 (GMT)
commit41be6a0d5aa3c4fcb472f3d44251683b085b00a3 (patch)
tree75d3aac76ba345c4a1035926d64a45ef37a5809e /block/bsg-lib.c
parentbf604a4c44a91cc2ceb60d4643a091b6b32cc999 (diff)
downloadlinux-41be6a0d5aa3c4fcb472f3d44251683b085b00a3.tar.xz
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 b12206e917ac34bec41b9ff93d37d8bd53a2b3bc 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 <manfred.schlaegl@gmx.at> Reviewed-by: Michael Welling <mwelling@ieee.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'block/bsg-lib.c')
0 files changed, 0 insertions, 0 deletions