linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mpc832x_rdb: fix of_irq_to_resource() error check
@ 2017-07-29 19:52 Sergei Shtylyov
  2017-07-30  1:51 ` Scott Wood
  2017-08-03 10:19 ` Michael Ellerman
  0 siblings, 2 replies; 5+ messages in thread
From: Sergei Shtylyov @ 2017-07-29 19:52 UTC (permalink / raw)
  To: Scott Wood, Kumar Gala, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, linuxppc-dev
  Cc: Thomas Petazzoni, Sergei Shtylyov

of_irq_to_resource() has recently been  fixed to return negative error #'s
along with 0 in case of failure,  however the Freescale MPC832x RDB board
code still only regards 0 as as failure indication -- fix it up.

Fixes: 7a4228bbff76 ("of: irq: use of_irq_get() in of_irq_to_resource()")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
The patch is against the 'master' branch of Scott Wood's 'linux.git' repo
(the 'fixes' branch is too much behind).

 arch/powerpc/platforms/83xx/mpc832x_rdb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux/arch/powerpc/platforms/83xx/mpc832x_rdb.c
===================================================================
--- linux.orig/arch/powerpc/platforms/83xx/mpc832x_rdb.c
+++ linux/arch/powerpc/platforms/83xx/mpc832x_rdb.c
@@ -89,7 +89,7 @@ static int __init of_fsl_spi_probe(char
 			goto err;
 
 		ret = of_irq_to_resource(np, 0, &res[1]);
-		if (!ret)
+		if (ret <= 0)
 			goto err;
 
 		pdev = platform_device_alloc("mpc83xx_spi", i);

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-08-03 10:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-29 19:52 [PATCH] mpc832x_rdb: fix of_irq_to_resource() error check Sergei Shtylyov
2017-07-30  1:51 ` Scott Wood
2017-07-31 10:04   ` Michael Ellerman
2017-08-02  4:04     ` Scott Wood
2017-08-03 10:19 ` Michael Ellerman

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).