diff options
| author | Zhao Qiang <B45475@freescale.com> | 2014-06-25 23:26:43 -0400 |
|---|---|---|
| committer | Mark Brown <broonie@linaro.org> | 2014-07-02 15:50:17 -0400 |
| commit | ef4bbdec95cfa64d188e05aea64cbb16a21d7d97 (patch) | |
| tree | 6b704e26f871c3e8e7a83583aa2b306b3f9e159a /drivers | |
| parent | 7171511eaec5bf23fb06078f59784a3a0626b38f (diff) | |
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>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/spi/spi-fsl-lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-fsl-lib.c b/drivers/spi/spi-fsl-lib.c index 95212ea96c8d..e0b773fc29cb 100644 --- a/drivers/spi/spi-fsl-lib.c +++ b/drivers/spi/spi-fsl-lib.c | |||
| @@ -196,7 +196,7 @@ int of_mpc8xxx_spi_probe(struct platform_device *ofdev) | |||
| 196 | 196 | ||
| 197 | pinfo = devm_kzalloc(&ofdev->dev, sizeof(*pinfo), GFP_KERNEL); | 197 | pinfo = devm_kzalloc(&ofdev->dev, sizeof(*pinfo), GFP_KERNEL); |
| 198 | if (!pinfo) | 198 | if (!pinfo) |
| 199 | return -ENOMEM; | 199 | return ret; |
| 200 | 200 | ||
| 201 | pdata = &pinfo->pdata; | 201 | pdata = &pinfo->pdata; |
| 202 | dev->platform_data = pdata; | 202 | dev->platform_data = pdata; |
