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>
Showing
- drivers/macintosh/therm_adt746x.c 3 additions, 1 deletiondrivers/macintosh/therm_adt746x.c
- drivers/macintosh/therm_pm72.c 3 additions, 1 deletiondrivers/macintosh/therm_pm72.c
- drivers/macintosh/windfarm_lm75_sensor.c 3 additions, 1 deletiondrivers/macintosh/windfarm_lm75_sensor.c
- drivers/macintosh/windfarm_max6690_sensor.c 3 additions, 1 deletiondrivers/macintosh/windfarm_max6690_sensor.c
- drivers/macintosh/windfarm_smu_sat.c 3 additions, 1 deletiondrivers/macintosh/windfarm_smu_sat.c
Loading
Please register or sign in to comment