Skip to content

Commit

Permalink
USB: Remove unneeded pointer intf from speedtch_upload_firmware()
Browse files Browse the repository at this point in the history
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: Micah Gruber <micah.gruber@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Micah Gruber authored and Greg Kroah-Hartman committed Oct 12, 2007
1 parent 782e3b3 commit 011db81
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/usb/atm/speedtch.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ static int speedtch_upload_firmware(struct speedtch_instance_data *instance,
{
unsigned char *buffer;
struct usbatm_data *usbatm = instance->usbatm;
struct usb_interface *intf;
struct usb_device *usb_dev = usbatm->usb_dev;
int actual_length;
int ret = 0;
Expand All @@ -265,7 +264,7 @@ static int speedtch_upload_firmware(struct speedtch_instance_data *instance,
goto out;
}

if (!(intf = usb_ifnum_to_if(usb_dev, 2))) {
if (!usb_ifnum_to_if(usb_dev, 2)) {
ret = -ENODEV;
usb_dbg(usbatm, "%s: interface not found!\n", __func__);
goto out_free;
Expand Down

0 comments on commit 011db81

Please sign in to comment.