ALSA: Don't assume i2c device probing always succeeds
authorTakashi Iwai <tiwai@suse.de>
Thu, 1 Oct 2009 05:46:33 +0000 (07:46 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 1 Oct 2009 05:46:33 +0000 (07:46 +0200)
commit18c4078489fe064cc0ed08be3381cf2f26657f5f
tree72d5534c800da85393209a39d335af2d5606c695
parent5da5b6f9e967e8c62486444f97e66252c3768d7d
ALSA: Don't assume i2c device probing always succeeds

The client->driver pointer can be NULL when i2c-device probing fails
in i2c_new_device().  This patch adds the NULL checks for client->driver
and return the error instead of blind assumption of driver availability.

Reported-by: Tim Shepard <shep@alum.mit.edu>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/aoa/codecs/tas.c
sound/ppc/keywest.c