Skip to content

Commit

Permalink
cxgb4vf: Initialize mdio_addr before using it
Browse files Browse the repository at this point in the history
In commit 5ad24de ("cxgb4vf: Fix ethtool get_settings for VF driver")
mdio_addr of port_info structure was used unininitialzed. Fixing it.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Hariprasad Shenai authored and David S. Miller committed Jan 13, 2015
1 parent 5d632cb commit fd48e63
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/chelsio/cxgb4vf/t4vf_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,8 @@ int t4vf_port_init(struct adapter *adapter, int pidx)
return v;

v = be32_to_cpu(port_rpl.u.info.lstatus_to_modtype);
pi->mdio_addr = (v & FW_PORT_CMD_MDIOCAP_F) ?
FW_PORT_CMD_MDIOADDR_G(v) : -1;
pi->port_type = FW_PORT_CMD_PTYPE_G(v);
pi->mod_type = FW_PORT_MOD_TYPE_NA;

Expand Down

0 comments on commit fd48e63

Please sign in to comment.