1
0
Fork 0

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>
hifive-unleashed-5.1
Haiyang Zhang 2012-07-25 08:08:42 +00:00 committed by David S. Miller
parent fa85a6c29a
commit 5243e7bd98
1 changed files with 4 additions and 7 deletions

View 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);