* [PATCH v2] spi: deal with a compile warning
@ 2014-06-26 3:26 Zhao Qiang
2014-07-02 19:50 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Zhao Qiang @ 2014-06-26 3:26 UTC (permalink / raw)
To: linuxppc-dev, broonie, linux-spi, B07421; +Cc: Zhao Qiang
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>
---
Changes for v2:
-return ret instead of -ENOMEM when the kzalloc fails
drivers/spi/spi-fsl-lib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-fsl-lib.c b/drivers/spi/spi-fsl-lib.c
index e5d45fc..d40378f 100644
--- a/drivers/spi/spi-fsl-lib.c
+++ b/drivers/spi/spi-fsl-lib.c
@@ -202,7 +202,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;
--
1.8.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] spi: deal with a compile warning
2014-06-26 3:26 [PATCH v2] spi: deal with a compile warning Zhao Qiang
@ 2014-07-02 19:50 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2014-07-02 19:50 UTC (permalink / raw)
To: Zhao Qiang; +Cc: B07421, linuxppc-dev, linux-spi
[-- Attachment #1: Type: text/plain, Size: 196 bytes --]
On Thu, Jun 26, 2014 at 11:26:43AM +0800, Zhao Qiang wrote:
> ret is unused when CONFIG_FSL_SOC defined,
> so return ret instead of -ENOMEM when the
> kzalloc fails to avoid it.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-07-02 19:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-26 3:26 [PATCH v2] spi: deal with a compile warning Zhao Qiang
2014-07-02 19:50 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).