ASoC: fsl_ssi: fix kernel panic in probe function
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 <17b9e1c64588c7fa6419b4d29dc1f4426279ba01@amarulasolutions.com>
Reported-by: Jean-Michel Hautbois <f5f5842cdeca49e6a17f15637ef68fbe102660ad@vodalys.com>
Acked-by: Nicolin Chen <a809e197ca11609a4d74ffc18b0d9eb231aabd56@gmail.com>
Signed-off-by: Mark Brown <b51b9a92386687a9ac927cebfa0f978adeb8cea5@kernel.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs