[PATCH 1/1] Drivers: net: hyperv: Cleanup netvsc_change_mtu ()

From: K . Y . Srinivasan
Date: Fri Aug 29 2014 - 14:18:18 EST



Signed-off-by: K. Y. Srinivasan <kys@xxxxxxxxxxxxx>
---
drivers/net/hyperv/netvsc_drv.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index a9c5eaa..485f5b7 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -696,6 +696,7 @@ static int netvsc_change_mtu(struct net_device *ndev, int mtu)
struct netvsc_device *nvdev = hv_get_drvdata(hdev);
struct netvsc_device_info device_info;
int limit = ETH_DATA_LEN;
+ int ret;

if (nvdev == NULL || nvdev->destroy)
return -ENODEV;
@@ -716,7 +717,9 @@ static int netvsc_change_mtu(struct net_device *ndev, int mtu)
ndevctx->device_ctx = hdev;
hv_set_drvdata(hdev, ndev);
device_info.ring_size = ring_size;
- rndis_filter_device_add(hdev, &device_info);
+ ret = rndis_filter_device_add(hdev, &device_info);
+ if (ret)
+ return ret;
netif_tx_wake_all_queues(ndev);

return 0;
--
1.7.4.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/