mpc832x_rdb: fix of_irq_to_resource() error check
Subsystems (2)
PATCH 1/1 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 as failure indication -- fix it up.
---
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(-)
arch/powerpc/platforms/83xx/mpc832x_rdb.c +1 -1
@@ -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);
Quoted 10 lines · 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 <[email protected]>---
The patch is against the 'master' branch of Scott Wood's 'linux.git' repo (the 'fixes' branch is too much behind).
The master branch is also old. Those branches are only used when needed to apply patches; I don't update them just to sync up. If they're older than what's in Michael's or Linus's tree (as they almost always are), then use those instead.
Not that I expect it to make a difference to this patch...
-Scott
Michael Ellerman
reviewerQuoted 2 lines · Scott Wood
Quoted 1 line · Sergei Shtylyov
of_irq_to_resource()has recently been=C2=A0=C2=A0fixed to return negati=
ve error #'s
Quoted 1 line
Quoted 1 line
along with 0 in case of failure,=C2=A0=C2=A0however the Freescale MPC832=
x RDB board
Quoted 10 lines
Quoted 8 lines
code still only regards 0 as as failure indication -- fix it up. =20
Fixes 7a4228bbff76 ("of: irq: use of_irq_get() in of_irq_to_resource()")Signed-off-by Sergei Shtylyov <[email protected]>=20
---
The patch is against the 'master' branch of Scott Wood's 'linux.git' repo (the 'fixes' branch is too much behind).The master branch is also old. Those branches are only used when needed =
to
Quoted 5 lines
apply patches; I don't update them just to sync up. If they're older than what's in Michael's or Linus's tree (as they almost always are), then use those instead.
Not that I expect it to make a difference to this patch...
Do you want me to grab this as a fix for 4.13 ?
cheers
Scott Wood
Acked-byQuoted 24 lines · Michael Ellerman
Quoted 22 lines · Scott Wood
Quoted 6 lines · 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.Quoted 8 lines
Fixes 7a4228bbff76 ("of: irq: use of_irq_get() in
of_irq_to_resource()")Signed-off-by Sergei Shtylyov <[email protected]>---
The patch is against the 'master' branch of Scott Wood's 'linux.git' repo
(the 'fixes' branch is too much behind).The master branch is also old. Those branches are only used when needed to
apply patches; I don't update them just to sync up. If they're older than what's in Michael's or Linus's tree (as they almost always are), then use those instead.
Quoted 3 lines
Quoted 1 line
Not that I expect it to make a difference to this patch...
Do you want me to grab this as a fix for 4.13 ?
Sure:
-Scott
Michael Ellerman
AppliedQuoted 7 lines · 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 <[email protected]>Acked-by Scott Wood <[email protected]>
Applied to powerpc fixes, thanks.
https://git.kernel.org/powerpc/c/f29bb7861a5107cc1afbf5a565c310
cheers