Subject: [PATCH net-next 09/23] net/chelsio: Don't set N/A for not available FW

From: Leon Romanovsky <[email-masked]>
Date: Sun, 1 Mar 2020 16:44:42 +0200

From: Leon Romanovsky <[email-masked]>

There is no need to set N/A if FW is not available.

Signed-off-by: Leon Romanovsky <[email-masked]>
---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c | 4 +---
 1 file changed, 1 insertion(+), 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),
-- 
2.24.1