Skip to content

Commit

Permalink
net: usb: initialize tmp in dm9601.c to avoid warning
Browse files Browse the repository at this point in the history
In two places, tmp is initialized implicitly by being passed as a
pointer during a function call.  However, this is not obvious to the
compiler, which logs a warning.

Signed-off-by: Simon Que <sque@chromium.org>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Simon Que authored and David S. Miller committed Jan 18, 2013
1 parent fae5082 commit 15c8bb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/usb/dm9601.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ static int dm_read_shared_word(struct usbnet *dev, int phy, u8 reg, __le16 *valu
dm_write_reg(dev, DM_SHARED_CTRL, phy ? 0xc : 0x4);

for (i = 0; i < DM_TIMEOUT; i++) {
u8 tmp;
u8 tmp = 0;

udelay(1);
ret = dm_read_reg(dev, DM_SHARED_CTRL, &tmp);
Expand Down Expand Up @@ -165,7 +165,7 @@ static int dm_write_shared_word(struct usbnet *dev, int phy, u8 reg, __le16 valu
dm_write_reg(dev, DM_SHARED_CTRL, phy ? 0x1a : 0x12);

for (i = 0; i < DM_TIMEOUT; i++) {
u8 tmp;
u8 tmp = 0;

udelay(1);
ret = dm_read_reg(dev, DM_SHARED_CTRL, &tmp);
Expand Down

0 comments on commit 15c8bb1

Please sign in to comment.