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>
return -EFAULT;
pdev = of_find_device_by_node(plugin_node);
- if (!plugin_node)
+ if (!pdev)
return -EFAULT;
plugin = dev_get_drvdata(&pdev->dev);