]> git.baikalelectronics.ru Git - kernel.git/commit
macintosh: Don't assume i2c device probing always succeeds
authorJean Delvare <khali@linux-fr.org>
Sun, 4 Oct 2009 20:53:46 +0000 (22:53 +0200)
committerJean Delvare <khali@linux-fr.org>
Sun, 4 Oct 2009 20:53:46 +0000 (22:53 +0200)
commitcb1d990570c93eb7e46a9dc6a921912364f9a61d
tree1b7aa0dde7d69b0f90b80a0398c9699faae6260e
parent05905ba44dad2eb19d51409f5c907828470540c7
macintosh: Don't assume i2c device probing always succeeds

If i2c device probing fails, then there is no driver to dereference
after calling i2c_new_device(). Stop assuming that probing will always
succeed, to avoid NULL pointer dereferences. We have an easier access
to the driver anyway.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Tim Shepard <shep@alum.mit.edu>
Cc: Colin Leroy <colin@colino.net>
drivers/macintosh/therm_adt746x.c
drivers/macintosh/therm_pm72.c
drivers/macintosh/windfarm_lm75_sensor.c
drivers/macintosh/windfarm_max6690_sensor.c
drivers/macintosh/windfarm_smu_sat.c