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)
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>

No differences found