summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
diff options
context:
space:
mode:
authorManish Chopra <manish.chopra@qlogic.com>2013-05-30 09:51:35 +0000
committerDavid S. Miller <davem@davemloft.net>2013-05-30 16:52:37 -0700
commitb08a92bb7381ff03d4101bcc61e65120bc690a4f (patch)
treefd3b3d3ea9f2f05f30ff08171565c37d1ff0dacc /drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
parentdc7551cbf7744ef7374c3f3c46817413ad4bcc40 (diff)
netxen_nic: Log proper error message in case of mismatched adapter type
o log "Unknown" board name and "Unknown" serial number in case of mismatched adapter type found. This will avoid weird characters logs when an adapter is in bad state or corrupted. Signed-off-by: Manish Chopra <manish.chopra@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c')
-rw-r--r--drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
index 2294cd2293b1..558df468f2e4 100644
--- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
+++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
@@ -841,7 +841,9 @@ netxen_check_options(struct netxen_adapter *adapter)
}
if (adapter->portnum == 0) {
- get_brd_name_by_type(adapter->ahw.board_type, brd_name);
+ if (netxen_nic_get_brd_name_by_type(adapter->ahw.board_type,
+ brd_name))
+ strcpy(serial_num, "Unknown");
pr_info("%s: %s Board S/N %s Chip rev 0x%x\n",
module_name(THIS_MODULE),