* [PATCH v2] spi: deal with a compile warning
@ 2014-06-26 3:26 Zhao Qiang
[not found] ` <1403753203-13473-1-git-send-email-B45475-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Zhao Qiang @ 2014-06-26 3:26 UTC (permalink / raw)
To: linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ,
broonie-DgEjT+Ai2ygdnm+yROfE0A, linux-spi-u79uwXL29TY76Z2rM5mHXA,
B07421-KZfg59tc24xl57MIdRCFDg
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-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
---
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
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [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
[not found] ` <1403753203-13473-1-git-send-email-B45475-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
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).