]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/hyperv/rndis_filter.c
Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm
[karo-tx-linux.git] / drivers / net / hyperv / rndis_filter.c
index fbf53946820525c19d6c1b7db46de38a4d6ad85f..e5d6146937fa0aade2476662ce87084b7337187c 100644 (file)
@@ -804,18 +804,15 @@ int rndis_filter_device_add(struct hv_device *dev,
        /* Send the rndis initialization message */
        ret = rndis_filter_init_device(rndis_device);
        if (ret != 0) {
-               /*
-                * TODO: If rndis init failed, we will need to shut down the
-                * channel
-                */
+               rndis_filter_device_remove(dev);
+               return ret;
        }
 
        /* Get the mac address */
        ret = rndis_filter_query_device_mac(rndis_device);
        if (ret != 0) {
-               /*
-                * TODO: shutdown rndis device and the channel
-                */
+               rndis_filter_device_remove(dev);
+               return ret;
        }
 
        memcpy(device_info->mac_adr, rndis_device->hw_mac_adr, ETH_ALEN);