|
@@ -663,7 +663,8 @@ int rtl818x_probe(struct pci_device *pdev )
|
663
|
663
|
hwinfo = zalloc(sizeof(*hwinfo));
|
664
|
664
|
if (!hwinfo) {
|
665
|
665
|
DBG("rtl818x: hwinfo alloc failed\n");
|
666
|
|
- return -ENOMEM;
|
|
666
|
+ err = -ENOMEM;
|
|
667
|
+ goto err_alloc_hwinfo;
|
667
|
668
|
}
|
668
|
669
|
|
669
|
670
|
adjust_pci_device(pdev);
|
|
@@ -671,7 +672,8 @@ int rtl818x_probe(struct pci_device *pdev )
|
671
|
672
|
dev = net80211_alloc(sizeof(*priv));
|
672
|
673
|
if (!dev) {
|
673
|
674
|
DBG("rtl818x: net80211 alloc failed\n");
|
674
|
|
- return -ENOMEM;
|
|
675
|
+ err = -ENOMEM;
|
|
676
|
+ goto err_alloc_dev;
|
675
|
677
|
}
|
676
|
678
|
|
677
|
679
|
priv = dev->priv;
|
|
@@ -816,7 +818,9 @@ int rtl818x_probe(struct pci_device *pdev )
|
816
|
818
|
err_free_dev:
|
817
|
819
|
pci_set_drvdata(pdev, NULL);
|
818
|
820
|
net80211_free(dev);
|
|
821
|
+ err_alloc_dev:
|
819
|
822
|
free(hwinfo);
|
|
823
|
+ err_alloc_hwinfo:
|
820
|
824
|
return err;
|
821
|
825
|
}
|
822
|
826
|
|