Re: [PATCH net-next,2/2] hyperv: Add error handling to rndis_filter_device_add()
From: Haiyang Zhang Date: Wed, 25 Jul 2012 11:08:42 -0700 > Reported-by: Jason Wang > Signed-off-by: Haiyang Zhang > Reviewed-by: K. Y. Srinivasan Applied. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH net-next,2/2] hyperv: Add error handling to rndis_filter_device_add()
Reported-by: Jason Wang Signed-off-by: Haiyang Zhang Reviewed-by: K. Y. Srinivasan --- 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 fbf5394..e5d6146 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, /* 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); -- 1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH net-next,2/2] hyperv: Add error handling to rndis_filter_device_add()
Reported-by: Jason Wang jasow...@redhat.com Signed-off-by: Haiyang Zhang haiya...@microsoft.com Reviewed-by: K. Y. Srinivasan k...@microsoft.com --- 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 fbf5394..e5d6146 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, /* 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); -- 1.7.4.1 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH net-next,2/2] hyperv: Add error handling to rndis_filter_device_add()
From: Haiyang Zhang haiya...@microsoft.com Date: Wed, 25 Jul 2012 11:08:42 -0700 Reported-by: Jason Wang jasow...@redhat.com Signed-off-by: Haiyang Zhang haiya...@microsoft.com Reviewed-by: K. Y. Srinivasan k...@microsoft.com Applied. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/