提交 011db815 编写于 作者: M Micah Gruber 提交者: Greg Kroah-Hartman

USB: Remove unneeded pointer intf from speedtch_upload_firmware()

This trivial patch removes the unneeded pointer intf returned from
usb_ifnum_to_if(), which is never used. The check for NULL can be simply done
by if (!usb_ifnum_to_if(usb_dev, 2)).
Signed-off-by: NMicah Gruber <micah.gruber@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 782e3b3b
...@@ -251,7 +251,6 @@ static int speedtch_upload_firmware(struct speedtch_instance_data *instance, ...@@ -251,7 +251,6 @@ static int speedtch_upload_firmware(struct speedtch_instance_data *instance,
{ {
unsigned char *buffer; unsigned char *buffer;
struct usbatm_data *usbatm = instance->usbatm; struct usbatm_data *usbatm = instance->usbatm;
struct usb_interface *intf;
struct usb_device *usb_dev = usbatm->usb_dev; struct usb_device *usb_dev = usbatm->usb_dev;
int actual_length; int actual_length;
int ret = 0; int ret = 0;
...@@ -265,7 +264,7 @@ static int speedtch_upload_firmware(struct speedtch_instance_data *instance, ...@@ -265,7 +264,7 @@ static int speedtch_upload_firmware(struct speedtch_instance_data *instance,
goto out; goto out;
} }
if (!(intf = usb_ifnum_to_if(usb_dev, 2))) { if (!usb_ifnum_to_if(usb_dev, 2)) {
ret = -ENODEV; ret = -ENODEV;
usb_dbg(usbatm, "%s: interface not found!\n", __func__); usb_dbg(usbatm, "%s: interface not found!\n", __func__);
goto out_free; goto out_free;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册