usb: phy: twl6030-usb: signedness bug in twl6030_readb()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 8 Nov 2013 09:43:17 +0000 (01:43 -0800)
committerFelipe Balbi <balbi@ti.com>
Mon, 25 Nov 2013 21:53:43 +0000 (15:53 -0600)
"ret" needs to be signed for the error handling to work.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/phy/phy-twl6030-usb.c

index 30e8a61552d4d0526d999c0b49651593f04a5530..bad57ce77ba508e0f6ff8c07fa516e9477606a3c 100644 (file)
@@ -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)