From db608c129b5258dbdff9c221857a95bc2dc1128e Mon Sep 17 00:00:00 2001 From: Sritej Velaga Date: Fri, 3 Feb 2012 11:35:12 +0000 Subject: [PATCH] netxen_nic: Fix phy link status Pass the adapter phy link status to the caller. Signed-off-by: Sritej Velaga Signed-off-by: David S. Miller --- drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c index 8f89c05e0c70..f3c0057a802b 100644 --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c @@ -559,7 +559,11 @@ nx_fw_cmd_query_phy(struct netxen_adapter *adapter, u32 reg, u32 *val) if (rcode != NX_RCODE_SUCCESS) return -EIO; - return cmd.rsp.arg1; + if (val == NULL) + return -EIO; + + *val = cmd.rsp.arg1; + return 0; } int -- 2.20.1