瀏覽代碼

[ALSA] powermac - Fix Oops when conflicting with aoa driver

Fixed Oops when conflictin with aoa driver due to lack of
i2c initialization.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Takashi Iwai 18 年之前
父節點
當前提交
783eaf4671
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      sound/ppc/keywest.c

+ 3 - 0
sound/ppc/keywest.c

@@ -117,6 +117,9 @@ int __init snd_pmac_tumbler_post_init(void)
 {
 	int err;
 	
+	if (!keywest_ctx || !keywest_ctx->client)
+		return -ENXIO;
+
 	if ((err = keywest_ctx->init_client(keywest_ctx)) < 0) {
 		snd_printk(KERN_ERR "tumbler: %i :cannot initialize the MCS\n", err);
 		return err;