diff options
author | Leon Romanovsky <leonro@mellanox.com> | 2020-03-01 16:44:42 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-03-03 17:54:54 -0800 |
commit | 50ad85c28a165f9d28be7609f44fdab785a3e34f (patch) | |
tree | 9e73ba22ba418e0bbf6e7b622e4fe36cd468674c /drivers | |
parent | 01e392aa4908ba3a6f4497f4b6852ad0ebf0ee4a (diff) | |
download | linux-50ad85c28a165f9d28be7609f44fdab785a3e34f.tar.bz2 |
net/chelsio: Don't set N/A for not available FW
There is no need to set N/A if FW is not available.
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c index f3acdce74d43..2cf35696b1c4 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c @@ -174,9 +174,7 @@ static void get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) sizeof(info->bus_info)); info->regdump_len = get_regs_len(dev); - if (!adapter->params.fw_vers) - strcpy(info->fw_version, "N/A"); - else + if (adapter->params.fw_vers) snprintf(info->fw_version, sizeof(info->fw_version), "%u.%u.%u.%u, TP %u.%u.%u.%u", FW_HDR_FW_VER_MAJOR_G(adapter->params.fw_vers), |