From: Michael Trimarchi Date: Thu, 18 Sep 2014 18:38:09 +0000 (+0200) Subject: ASoC: fsl_ssi: fix kernel panic in probe function X-Git-Tag: fixes-for-v3.18-merge-window~52^2~1^2^4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85151461f114f2fca386bb8ae6de185461d35d87;p=pandora-kernel.git 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 Reported-by: Jean-Michel Hautbois Acked-by: Nicolin Chen Signed-off-by: Mark Brown --- Reading git-diff-tree failed