USB: core: remove set but not used variable 'udev'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/usb/core/driver.c: In function 'usb_driver_claim_interface':
drivers/usb/core/driver.c:513:21: warning:
 variable 'udev' set but not used [-Wunused-but-set-variable]

Since commit c183813fce ("USB: remove LPM management from
usb_driver_claim_interface()"), 'udev' is not used.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
YueHaibing 2018-10-04 03:06:12 +00:00 committed by Greg Kroah-Hartman
parent bf7f547ecd
commit c36e96bd25
1 changed files with 0 additions and 3 deletions

View File

@ -510,7 +510,6 @@ int usb_driver_claim_interface(struct usb_driver *driver,
struct usb_interface *iface, void *priv)
{
struct device *dev;
struct usb_device *udev;
int retval = 0;
if (!iface)
@ -524,8 +523,6 @@ int usb_driver_claim_interface(struct usb_driver *driver,
if (!iface->authorized)
return -ENODEV;
udev = interface_to_usbdev(iface);
dev->driver = &driver->drvwrap.driver;
usb_set_intfdata(iface, priv);
iface->needs_binding = 0;