We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b17a49 commit 640bf95Copy full SHA for 640bf95
drivers/net/ethernet/3com/3c589_cs.c
@@ -195,6 +195,7 @@ static int tc589_probe(struct pcmcia_device *link)
195
{
196
struct el3_private *lp;
197
struct net_device *dev;
198
+ int ret;
199
200
dev_dbg(&link->dev, "3c589_attach()\n");
201
@@ -218,7 +219,15 @@ static int tc589_probe(struct pcmcia_device *link)
218
219
220
dev->ethtool_ops = &netdev_ethtool_ops;
221
- 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;
231
}
232
233
static void tc589_detach(struct pcmcia_device *link)
0 commit comments