Skip to contentSkip to conversation

usb: phy: twl6030-usb: signedness bug in twl6030_readb()

PATCH New Dan Carpenter 1 participant 1 message Nov 8, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: phy: twl6030-usb: signedness bug in twl6030_readb()

"ret" needs to be signed for the error handling to work.

drivers/usb/phy/phy-twl6030-usb.c +2 -1
index 30e8a61..bad57ce 100644
@@ -127,7 +127,8 @@ static inline int twl6030_writeb(struct twl6030_usb *twl, u8 module,
 
 static inline u8 twl6030_readb(struct twl6030_usb *twl, u8 module, u8 address)
 {
-	u8 data, ret = 0;
+	u8 data;
+	int ret;
 
 	ret = twl_i2c_read_u8(module, &data, address);
 	if (ret >= 0)