| .. | .. |
|---|
| 157 | 157 | { |
|---|
| 158 | 158 | struct orinoco_private *priv; |
|---|
| 159 | 159 | struct orinoco_pccard *card; |
|---|
| 160 | + int ret; |
|---|
| 160 | 161 | |
|---|
| 161 | 162 | priv = alloc_orinocodev(sizeof(*card), &link->dev, |
|---|
| 162 | 163 | spectrum_cs_hard_reset, |
|---|
| .. | .. |
|---|
| 169 | 170 | card->p_dev = link; |
|---|
| 170 | 171 | link->priv = priv; |
|---|
| 171 | 172 | |
|---|
| 172 | | - return spectrum_cs_config(link); |
|---|
| 173 | | -} /* spectrum_cs_attach */ |
|---|
| 173 | + ret = spectrum_cs_config(link); |
|---|
| 174 | + if (ret) |
|---|
| 175 | + goto err_free_orinocodev; |
|---|
| 176 | + |
|---|
| 177 | + return 0; |
|---|
| 178 | + |
|---|
| 179 | +err_free_orinocodev: |
|---|
| 180 | + free_orinocodev(priv); |
|---|
| 181 | + return ret; |
|---|
| 182 | +} |
|---|
| 174 | 183 | |
|---|
| 175 | 184 | static void spectrum_cs_detach(struct pcmcia_device *link) |
|---|
| 176 | 185 | { |
|---|
| .. | .. |
|---|
| 278 | 287 | spectrum_cs_suspend(struct pcmcia_device *link) |
|---|
| 279 | 288 | { |
|---|
| 280 | 289 | struct orinoco_private *priv = link->priv; |
|---|
| 281 | | - int err = 0; |
|---|
| 282 | 290 | |
|---|
| 283 | 291 | /* Mark the device as stopped, to block IO until later */ |
|---|
| 284 | 292 | orinoco_down(priv); |
|---|
| 285 | 293 | |
|---|
| 286 | | - return err; |
|---|
| 294 | + return 0; |
|---|
| 287 | 295 | } |
|---|
| 288 | 296 | |
|---|
| 289 | 297 | static int |
|---|