瀏覽代碼

corral some wayward N/A fw_version dust bunnies

Round-up some wayward "N/A" fw_version dust bunnies as part of that
clean-up.

Signed-off-by: Rick Jones <rick.jones2@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Rick Jones 13 年之前
父節點
當前提交
8ac72d1671
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 0 1
      drivers/net/ethernet/neterion/s2io.c
  2. 3 2
      drivers/net/ethernet/realtek/r8169.c

+ 0 - 1
drivers/net/ethernet/neterion/s2io.c

@@ -5393,7 +5393,6 @@ static void s2io_ethtool_gdrvinfo(struct net_device *dev,
 
 
 	strlcpy(info->driver, s2io_driver_name, sizeof(info->driver));
 	strlcpy(info->driver, s2io_driver_name, sizeof(info->driver));
 	strlcpy(info->version, s2io_driver_version, sizeof(info->version));
 	strlcpy(info->version, s2io_driver_version, sizeof(info->version));
-	strlcpy(info->fw_version, "", sizeof(info->fw_version));
 	strlcpy(info->bus_info, pci_name(sp->pdev), sizeof(info->bus_info));
 	strlcpy(info->bus_info, pci_name(sp->pdev), sizeof(info->bus_info));
 	info->regdump_len = XENA_REG_SPACE;
 	info->regdump_len = XENA_REG_SPACE;
 	info->eedump_len = XENA_EEPROM_SPACE;
 	info->eedump_len = XENA_EEPROM_SPACE;

+ 3 - 2
drivers/net/ethernet/realtek/r8169.c

@@ -1405,8 +1405,9 @@ static void rtl8169_get_drvinfo(struct net_device *dev,
 	strlcpy(info->version, RTL8169_VERSION, sizeof(info->version));
 	strlcpy(info->version, RTL8169_VERSION, sizeof(info->version));
 	strlcpy(info->bus_info, pci_name(tp->pci_dev), sizeof(info->bus_info));
 	strlcpy(info->bus_info, pci_name(tp->pci_dev), sizeof(info->bus_info));
 	BUILD_BUG_ON(sizeof(info->fw_version) < sizeof(rtl_fw->version));
 	BUILD_BUG_ON(sizeof(info->fw_version) < sizeof(rtl_fw->version));
-	strlcpy(info->fw_version, IS_ERR_OR_NULL(rtl_fw) ? "N/A" :
-	       rtl_fw->version, sizeof(info->fw_version));
+	if (!IS_ERR_OR_NULL(rtl_fw))
+		strlcpy(info->fw_version, rtl_fw->version,
+			sizeof(info->fw_version));
 }
 }
 
 
 static int rtl8169_get_regs_len(struct net_device *dev)
 static int rtl8169_get_regs_len(struct net_device *dev)