diff options
author | Michael Trimarchi <michael@amarulasolutions.com> | 2014-09-18 22:38:09 +0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-09-23 05:58:48 +0400 |
commit | 85151461f114f2fca386bb8ae6de185461d35d87 (patch) | |
tree | 27dff020ff42f7eb5f063a476a6106a033d57b25 /scripts/headers_check.pl | |
parent | 7d1311b93e58ed55f3a31cc8f94c4b8fe988a2b9 (diff) | |
download | linux-85151461f114f2fca386bb8ae6de185461d35d87.tar.xz |
ASoC: fsl_ssi: fix kernel panic in probe function
code can raise a panic when the ssi_private->pdev is null
[...]
/*
* If codec-handle property is missing from SSI node, we assume
* that the machine driver uses new binding which does not require
* SSI driver to trigger machine driver's probe.
*/
if (!of_get_property(np, "codec-handle", NULL))
goto done;
[...]
ssi_private->pdev =
platform_device_register_data(&pdev->dev, name, 0, NULL, 0);
[...]
done:
if (ssi_private->dai_fmt)
_fsl_ssi_set_dai_fmt(ssi_private, ssi_private->dai_fmt);
Proposal was to not use ssi_private->pdev->dev here but adding a new parameter
of *dev pointer to this _set_dai_fmt() -- passing pdev->dev in probe() and
cpu_dai->dev in fsl_ssi_set_dai_fmt().
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Reported-by: Jean-Michel Hautbois <jean-michel.hautbois@vodalys.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'scripts/headers_check.pl')
0 files changed, 0 insertions, 0 deletions