staging: hv: change rndis_filter_device_remove() to void return type
authorHaiyang Zhang <haiyangz@microsoft.com>
Mon, 23 May 2011 16:03:47 +0000 (09:03 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 7 Jun 2011 20:36:00 +0000 (13:36 -0700)
rndis_filter_device_remove() always return 0, so change it to void return
type. Also cleaned up the error checking in the caller.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/hyperv_net.h
drivers/staging/hv/netvsc_drv.c
drivers/staging/hv/rndis_filter.c

index 315097df799adcb1a36121928637076fb2adc31b..6226dd343f00b46f167a2412ea115e14b556b92a 100644 (file)
@@ -101,7 +101,7 @@ int rndis_filter_open(struct hv_device *dev);
 int rndis_filter_close(struct hv_device *dev);
 int rndis_filte_device_add(struct hv_device *dev,
                        void *additional_info);
-int rndis_filter_device_remove(struct hv_device *dev);
+void rndis_filter_device_remove(struct hv_device *dev);
 int rndis_filter_receive(struct hv_device *dev,
                        struct hv_netvsc_packet *pkt);
 
index e716d4d86c8dbb3e46b6d7d79aeb2f4c183eb3f9..ad254335d95566e0181aa38d886b5bc58af5241f 100644 (file)
@@ -387,7 +387,6 @@ static int netvsc_probe(struct hv_device *dev)
 static int netvsc_remove(struct hv_device *dev)
 {
        struct net_device *net = dev_get_drvdata(&dev->device);
-       int ret;
 
        if (net == NULL) {
                dev_err(&dev->device, "No net device to remove\n");
@@ -404,14 +403,10 @@ static int netvsc_remove(struct hv_device *dev)
         * Call to the vsc driver to let it know that the device is being
         * removed
         */
-       ret = rndis_filter_device_remove(dev);
-       if (ret != 0) {
-               /* TODO: */
-               netdev_err(net, "unable to remove vsc device (ret %d)\n", ret);
-       }
+       rndis_filter_device_remove(dev);
 
        free_netdev(net);
-       return ret;
+       return 0;
 }
 
 /* The one and only one */
index 60ebdb1b6082b33f1a993b1b6928da599df4c1fc..572cec64b867045a9afae4b823f8744ce0d7253a 100644 (file)
@@ -741,7 +741,7 @@ int rndis_filte_device_add(struct hv_device *dev,
        return ret;
 }
 
-int rndis_filter_device_remove(struct hv_device *dev)
+void rndis_filter_device_remove(struct hv_device *dev)
 {
        struct netvsc_device *net_dev = dev->ext;
        struct rndis_device *rndis_dev = net_dev->extension;
@@ -753,8 +753,6 @@ int rndis_filter_device_remove(struct hv_device *dev)
        net_dev->extension = NULL;
 
        netvsc_device_remove(dev);
-
-       return 0;
 }