can: ucan: remove set but not used variable 'udev'
authorYueHaibing <yuehaibing@huawei.com>
Wed, 29 Aug 2018 01:46:54 +0000 (01:46 +0000)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 9 Nov 2018 16:20:07 +0000 (17:20 +0100)
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/can/usb/ucan.c: In function 'ucan_disconnect':
drivers/net/can/usb/ucan.c:1578:21: warning:
 variable 'udev' set but not used [-Wunused-but-set-variable]
  struct usb_device *udev;

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Martin Elshuber <martin.elshuber@theobroma-systems.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/ucan.c

index 0678a38b1af4588135f04074c56b37cfe6d09b70..c9fd83e8d9477d5599614cceca2315784301789e 100644 (file)
@@ -1575,11 +1575,8 @@ err_firmware_needs_update:
 /* disconnect the device */
 static void ucan_disconnect(struct usb_interface *intf)
 {
-       struct usb_device *udev;
        struct ucan_priv *up = usb_get_intfdata(intf);
 
-       udev = interface_to_usbdev(intf);
-
        usb_set_intfdata(intf, NULL);
 
        if (up) {