]> git.karo-electronics.de Git - karo-tx-linux.git/commit
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)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 22 Oct 2009 22:11:58 +0000 (15:11 -0700)
commit6a56395fa727528beb92ffe3b126068894fb7893
tree1e248fb71c03eec17d8cbdf1034b4898511da9ec
parent91be0e881d6abf1da9903c831d20954f2325ce3e
ALSA: Don't assume i2c device probing always succeeds

commit 18c4078489fe064cc0ed08be3381cf2f26657f5f upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sound/aoa/codecs/tas.c
sound/ppc/keywest.c