From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Scott Wood <oss@buserror.net>,
Kumar Gala <galak@kernel.crashing.org>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>,
linuxppc-dev@lists.ozlabs.org
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Subject: [PATCH] mpc832x_rdb: fix of_irq_to_resource() error check
Date: Sat, 29 Jul 2017 22:52:09 +0300 [thread overview]
Message-ID: <20170729195217.214940504@cogentembedded.com> (raw)
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);
next reply other threads:[~2017-07-29 19:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-29 19:52 Sergei Shtylyov [this message]
2017-07-30 1:51 ` [PATCH] mpc832x_rdb: fix of_irq_to_resource() error check Scott Wood
2017-07-31 10:04 ` Michael Ellerman
2017-08-02 4:04 ` Scott Wood
2017-08-03 10:19 ` Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170729195217.214940504@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=benh@kernel.crashing.org \
--cc=galak@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=oss@buserror.net \
--cc=paulus@samba.org \
--cc=thomas.petazzoni@free-electrons.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).