]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/vxge/vxge-config.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[karo-tx-linux.git] / drivers / net / vxge / vxge-config.c
index ec4408ceef1868063bb88bbe2ef1030dd910a03c..a5fc8166c01d8e49a933ffdb98d92ccb4bc410aa 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/etherdevice.h>
 #include <linux/pci.h>
 #include <linux/pci_hotplug.h>
+#include <linux/slab.h>
 
 #include "vxge-traffic.h"
 #include "vxge-config.h"
@@ -634,8 +635,10 @@ vxge_hw_device_initialize(
        __vxge_hw_device_pci_e_init(hldev);
 
        status = __vxge_hw_device_reg_addr_get(hldev);
-       if (status != VXGE_HW_OK)
+       if (status != VXGE_HW_OK) {
+               vfree(hldev);
                goto exit;
+       }
        __vxge_hw_device_id_get(hldev);
 
        __vxge_hw_device_host_info_get(hldev);