netxen_nic: Fix phy link status
authorSritej Velaga <sritej.velaga@qlogic.com>
Fri, 3 Feb 2012 11:35:12 +0000 (11:35 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 4 Feb 2012 20:59:29 +0000 (15:59 -0500)
Pass the adapter phy link status to the caller.

Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c

index 8f89c05e0c701b6c1a9b36604a1086318e60081b..f3c0057a802b1464cbfeb65782d01186046ff600 100644 (file)
@@ -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