Skip to content
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.

Commit

Permalink
net: usb: sr9800: fix uninitialized local variable
Browse files Browse the repository at this point in the history
commit 77b6d09f4ae66d42cd63b121af67780ae3d1a5e9 upstream.

Make sure res does not contain random value if the call to
sr_read_cmd fails for some reason.

Reported-by: [email protected]
Signed-off-by: Valentin Vidic <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
vvidic authored and AbhinandAK350 committed Nov 8, 2019
1 parent 508a7df commit a294a81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/usb/sr9800.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ static void sr_set_multicast(struct net_device *net)
static int sr_mdio_read(struct net_device *net, int phy_id, int loc)
{
struct usbnet *dev = netdev_priv(net);
__le16 res;
__le16 res = 0;

mutex_lock(&dev->phy_mutex);
sr_set_sw_mii(dev);
Expand Down

0 comments on commit a294a81

Please sign in to comment.