Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Zhao Qiang and committed by
Mark Brown
ef4bbdec 7171511e

+1 -1
+1 -1
drivers/spi/spi-fsl-lib.c
··· 196 196 197 197 pinfo = devm_kzalloc(&ofdev->dev, sizeof(*pinfo), GFP_KERNEL); 198 198 if (!pinfo) 199 - return -ENOMEM; 199 + return ret; 200 200 201 201 pdata = &pinfo->pdata; 202 202 dev->platform_data = pdata;