diff options
author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2017-07-29 15:52:09 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-08-02 05:26:52 -0400 |
commit | f29bb7861a5107cc1afbf5a565c3109aa88d5984 (patch) | |
tree | a4509f05427bd8a118624edfc4b733cf367bc391 | |
parent | cc491f1d3583146eaee635c86b9c9227fa835c6c (diff) |
powerpc/83xx/mpc832x_rdb: fix of_irq_to_resource() error check
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 a 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>
Acked-by: Scott Wood <oss@buserror.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r-- | arch/powerpc/platforms/83xx/mpc832x_rdb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/arch/powerpc/platforms/83xx/mpc832x_rdb.c index d7c9b186954d..763ffca9628d 100644 --- a/arch/powerpc/platforms/83xx/mpc832x_rdb.c +++ b/arch/powerpc/platforms/83xx/mpc832x_rdb.c | |||
@@ -89,7 +89,7 @@ static int __init of_fsl_spi_probe(char *type, char *compatible, u32 sysclk, | |||
89 | goto err; | 89 | goto err; |
90 | 90 | ||
91 | ret = of_irq_to_resource(np, 0, &res[1]); | 91 | ret = of_irq_to_resource(np, 0, &res[1]); |
92 | if (!ret) | 92 | if (ret <= 0) |
93 | goto err; | 93 | goto err; |
94 | 94 | ||
95 | pdev = platform_device_alloc("mpc83xx_spi", i); | 95 | pdev = platform_device_alloc("mpc83xx_spi", i); |