CHROMIUM: ASoC: samsung i2s: fix error for codec-plugin
authorVincent Palatin <vpalatin@chromium.org>
Fri, 12 Oct 2012 23:12:29 +0000 (16:12 -0700)
committerGerrit <chrome-bot@google.com>
Sat, 13 Oct 2012 01:43:05 +0000 (18:43 -0700)
The result of the device tree look-up for the plugin device
was checked against the wrong variable.
As a consequence, if the codec-plugin plugin property is set
to a non-existent value, the kernel will crash at startup instead of
skipping the plugin.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:14489
TEST=boot on Spring with hdmi-audio disabled in the device tree
and see we are longer crashing in i2s plugin probing.

Change-Id: I555e152519f6a2279a4e87d160661278d8d85f33
Reviewed-on: https://gerrit.chromium.org/gerrit/35470
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
sound/soc/samsung/i2s.c

index dd1a8ab..e99696d 100644 (file)
@@ -296,7 +296,7 @@ static int plugin_init(struct i2s_dai *i2s)
                        return -EFAULT;
 
                pdev = of_find_device_by_node(plugin_node);
-               if (!plugin_node)
+               if (!pdev)
                        return -EFAULT;
 
                plugin = dev_get_drvdata(&pdev->dev);