Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

phy: phy-twl4030-usb: silence an uninitialized variable warning

The "check" variable isn't necessarily initialized when we print it out
in the debugging messages. It's a pretty haphazard affair and it
doesn't matter very much what we initialize "check" to.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>

authored by

Dan Carpenter and committed by
Kishon Vijay Abraham I
df674efa 5e39c6cf

+1 -1
+1 -1
drivers/phy/ti/phy-twl4030-usb.c
··· 185 185 static int twl4030_i2c_write_u8_verify(struct twl4030_usb *twl, 186 186 u8 module, u8 data, u8 address) 187 187 { 188 - u8 check; 188 + u8 check = 0xFF; 189 189 190 190 if ((twl_i2c_write_u8(module, data, address) >= 0) && 191 191 (twl_i2c_read_u8(module, &check, address) >= 0) &&