hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/net/ethernet/3com/3c589_cs.c
....@@ -23,7 +23,6 @@
2323 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
2424
2525 #define DRV_NAME "3c589_cs"
26
-#define DRV_VERSION "1.162-ac"
2726
2827 #include <linux/module.h>
2928 #include <linux/kernel.h>
....@@ -173,7 +172,7 @@
173172 static struct net_device_stats *el3_get_stats(struct net_device *dev);
174173 static int el3_rx(struct net_device *dev);
175174 static int el3_close(struct net_device *dev);
176
-static void el3_tx_timeout(struct net_device *dev);
175
+static void el3_tx_timeout(struct net_device *dev, unsigned int txqueue);
177176 static void set_rx_mode(struct net_device *dev);
178177 static void set_multicast_list(struct net_device *dev);
179178 static const struct ethtool_ops netdev_ethtool_ops;
....@@ -196,6 +195,7 @@
196195 {
197196 struct el3_private *lp;
198197 struct net_device *dev;
198
+ int ret;
199199
200200 dev_dbg(&link->dev, "3c589_attach()\n");
201201
....@@ -219,7 +219,15 @@
219219
220220 dev->ethtool_ops = &netdev_ethtool_ops;
221221
222
- return tc589_config(link);
222
+ ret = tc589_config(link);
223
+ if (ret)
224
+ goto err_free_netdev;
225
+
226
+ return 0;
227
+
228
+err_free_netdev:
229
+ free_netdev(dev);
230
+ return ret;
223231 }
224232
225233 static void tc589_detach(struct pcmcia_device *link)
....@@ -482,7 +490,6 @@
482490 struct ethtool_drvinfo *info)
483491 {
484492 strlcpy(info->driver, DRV_NAME, sizeof(info->driver));
485
- strlcpy(info->version, DRV_VERSION, sizeof(info->version));
486493 snprintf(info->bus_info, sizeof(info->bus_info),
487494 "PCMCIA 0x%lx", dev->base_addr);
488495 }
....@@ -526,7 +533,7 @@
526533 return 0;
527534 }
528535
529
-static void el3_tx_timeout(struct net_device *dev)
536
+static void el3_tx_timeout(struct net_device *dev, unsigned int txqueue)
530537 {
531538 unsigned int ioaddr = dev->base_addr;
532539