Patchwork [5/5] powerpc/85xx: wrong variable returned on error

login
register
mail settings
Submitter Andrew Morton
Date Dec. 18, 2009, 12:45 a.m.
Message ID <200912180045.nBI0jFVV028429@imap1.linux-foundation.org>
Download mbox | patch
Permalink /patch/41355/
State Accepted
Delegated to: Benjamin Herrenschmidt
Headers show

Comments

Andrew Morton - Dec. 18, 2009, 12:45 a.m.
From: Roel Kluin <roel.kluin@gmail.com>

The wrong variable was returned in the case of an error.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

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

Patch

diff -puN arch/powerpc/platforms/85xx/mpc85xx_mds.c~powerpc-85xx-wrong-variable-returned-on-error arch/powerpc/platforms/85xx/mpc85xx_mds.c
--- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c~powerpc-85xx-wrong-variable-returned-on-error
+++ a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -86,7 +86,7 @@  static int mpc8568_fixup_125_clock(struc
 	scr = phy_read(phydev, MV88E1111_SCR);
 
 	if (scr < 0)
-		return err;
+		return scr;
 
 	err = phy_write(phydev, MV88E1111_SCR, scr | 0x0008);