hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/net/wireless/intersil/orinoco/orinoco_cs.c
....@@ -96,6 +96,7 @@
9696 {
9797 struct orinoco_private *priv;
9898 struct orinoco_pccard *card;
99
+ int ret;
99100
100101 priv = alloc_orinocodev(sizeof(*card), &link->dev,
101102 orinoco_cs_hard_reset, NULL);
....@@ -107,8 +108,16 @@
107108 card->p_dev = link;
108109 link->priv = priv;
109110
110
- return orinoco_cs_config(link);
111
-} /* orinoco_cs_attach */
111
+ ret = orinoco_cs_config(link);
112
+ if (ret)
113
+ goto err_free_orinocodev;
114
+
115
+ return 0;
116
+
117
+err_free_orinocodev:
118
+ free_orinocodev(priv);
119
+ return ret;
120
+}
112121
113122 static void orinoco_cs_detach(struct pcmcia_device *link)
114123 {