spi/fsl: deal with a compile warning
ret is unused when CONFIG_FSL_SOC defined, so return ret instead of -ENOMEM when the kzalloc fails to avoid it. Signed-off-by: Zhao Qiang <B45475@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
Родитель
7171511eae
Коммит
ef4bbdec95
|
@ -196,7 +196,7 @@ int of_mpc8xxx_spi_probe(struct platform_device *ofdev)
|
||||||
|
|
||||||
pinfo = devm_kzalloc(&ofdev->dev, sizeof(*pinfo), GFP_KERNEL);
|
pinfo = devm_kzalloc(&ofdev->dev, sizeof(*pinfo), GFP_KERNEL);
|
||||||
if (!pinfo)
|
if (!pinfo)
|
||||||
return -ENOMEM;
|
return ret;
|
||||||
|
|
||||||
pdata = &pinfo->pdata;
|
pdata = &pinfo->pdata;
|
||||||
dev->platform_data = pdata;
|
dev->platform_data = pdata;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче