diff options
author | Haiyang Zhang <haiyangz@microsoft.com> | 2012-07-25 04:08:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-25 18:31:30 -0400 |
commit | 5243e7bd98b2dfecef3acd82661b541905a86e7f (patch) | |
tree | 0a8147f0620efd0b87c56ca0f403f96ac383a6a5 /drivers | |
parent | fa85a6c29a493e8a574bf62a6349b38b591bf885 (diff) |
hyperv: Add error handling to rndis_filter_device_add()
Reported-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/hyperv/rndis_filter.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/net/hyperv/rndis_filter.c b/drivers/net/hyperv/rndis_filter.c index fbf539468205..e5d6146937fa 100644 --- a/drivers/net/hyperv/rndis_filter.c +++ b/drivers/net/hyperv/rndis_filter.c | |||
@@ -804,18 +804,15 @@ int rndis_filter_device_add(struct hv_device *dev, | |||
804 | /* Send the rndis initialization message */ | 804 | /* Send the rndis initialization message */ |
805 | ret = rndis_filter_init_device(rndis_device); | 805 | ret = rndis_filter_init_device(rndis_device); |
806 | if (ret != 0) { | 806 | if (ret != 0) { |
807 | /* | 807 | rndis_filter_device_remove(dev); |
808 | * TODO: If rndis init failed, we will need to shut down the | 808 | return ret; |
809 | * channel | ||
810 | */ | ||
811 | } | 809 | } |
812 | 810 | ||
813 | /* Get the mac address */ | 811 | /* Get the mac address */ |
814 | ret = rndis_filter_query_device_mac(rndis_device); | 812 | ret = rndis_filter_query_device_mac(rndis_device); |
815 | if (ret != 0) { | 813 | if (ret != 0) { |
816 | /* | 814 | rndis_filter_device_remove(dev); |
817 | * TODO: shutdown rndis device and the channel | 815 | return ret; |
818 | */ | ||
819 | } | 816 | } |
820 | 817 | ||
821 | memcpy(device_info->mac_adr, rndis_device->hw_mac_adr, ETH_ALEN); | 818 | memcpy(device_info->mac_adr, rndis_device->hw_mac_adr, ETH_ALEN); |