[PATCH] spi: include "int ret" with macro

Subsystems: spi subsystem, the rest

STALE4463d

2 messages, 2 authors, 2014-06-24 · open the first message on its own page

[PATCH] spi: include "int ret" with macro

From: Zhao Qiang <hidden>
Date: 2014-06-24 07:58:36

ret is unused when CONFIG_FSL_SOC defined,
so include it with "#ifndef CONFIG_FSL_SOC".

Signed-off-by: Zhao Qiang <redacted>
---
 drivers/spi/spi-fsl-lib.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/spi-fsl-lib.c b/drivers/spi/spi-fsl-lib.c
index e5d45fc..44aace1 100644
--- a/drivers/spi/spi-fsl-lib.c
+++ b/drivers/spi/spi-fsl-lib.c
@@ -198,8 +198,9 @@ int of_mpc8xxx_spi_probe(struct platform_device *ofdev)
 	struct mpc8xxx_spi_probe_info *pinfo;
 	struct fsl_spi_platform_data *pdata;
 	const void *prop;
+#ifndef CONFIG_FSL_SOC
 	int ret = -ENOMEM;
-
+#endif
 	pinfo = devm_kzalloc(&ofdev->dev, sizeof(*pinfo), GFP_KERNEL);
 	if (!pinfo)
 		return -ENOMEM;
-- 
1.8.5

Re: [PATCH] spi: include "int ret" with macro

From: Scott Wood <hidden>
Date: 2014-06-24 18:55:56

On Tue, 2014-06-24 at 15:55 +0800, Zhao Qiang wrote:
ret is unused when CONFIG_FSL_SOC defined,
so include it with "#ifndef CONFIG_FSL_SOC".

Signed-off-by: Zhao Qiang <redacted>
---
 drivers/spi/spi-fsl-lib.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
This needs to be sent to the SPI list and maintainer.

-Scott
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help