aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <[email protected]>2014-03-18 08:13:00 +0000
committerJonathan Cameron <[email protected]>2014-03-22 12:22:49 +0000
commitd0a588a57c2b0748df8307a0865a1bbbf1624c53 (patch)
tree38af1f01d38a1b036aef4e9060aea61af1c84336 /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf
parent2076a20fc1a06f7b0333c62a2bb4eeeac7ed1bcb (diff)
iio: cm36651: Fix i2c client leak and possible NULL pointer dereference
During probe the driver allocates dummy I2C devices (i2c_new_dummy()) but they aren't unregistered during driver remove or probe failure. Additionally driver does not check the return value of i2c_new_dummy(). In case of error (i2c_new_device(): memory allocation failure or I2C address cannot be used) this function returns NULL which is later dereferenced by i2c_smbus_{read,write}_data() functions. Fix issues by properly checking for i2c_new_dummy() return value and unregistering I2C devices on driver remove or probe failure. Signed-off-by: Krzysztof Kozlowski <[email protected]> Acked-by: Beomho Seo <[email protected]> Cc: [email protected] Signed-off-by: Jonathan Cameron <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf')
0 files changed, 0 insertions, 0 deletions