Skip to content

Commit

Permalink
spi/fsl: deal with a compile warning
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Zhao Qiang authored and Mark Brown committed Jul 2, 2014
1 parent 7171511 commit ef4bbde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi-fsl-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ int of_mpc8xxx_spi_probe(struct platform_device *ofdev)

pinfo = devm_kzalloc(&ofdev->dev, sizeof(*pinfo), GFP_KERNEL);
if (!pinfo)
return -ENOMEM;
return ret;

pdata = &pinfo->pdata;
dev->platform_data = pdata;
Expand Down

0 comments on commit ef4bbde

Please sign in to comment.