[PATCH] Fix error reporting in mcs7830_set_autoneg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix error reporting in mcs7830_set_autoneg

On a error need to return ret not true.  The condition of the ?:
is always true in the first case.

Signed-off-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>

---
 drivers/net/usb/mcs7830.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.35-rc4-gcc/drivers/net/usb/mcs7830.c
===================================================================
--- linux-2.6.35-rc4-gcc.orig/drivers/net/usb/mcs7830.c
+++ linux-2.6.35-rc4-gcc/drivers/net/usb/mcs7830.c
@@ -351,7 +351,7 @@ static int mcs7830_set_autoneg(struct us
 	if (!ret)
 		ret = mcs7830_write_phy(dev, MII_BMCR,
 				BMCR_ANENABLE | BMCR_ANRESTART	);
-	return ret < 0 ? : 0;
+	return ret < 0 ? ret : 0;
 }
 
 
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux