USB: rearrange code in usb_probe_interface
This patch (as1322) reverses the two outcomes of an "if" statement in usb_probe_interface(), to avoid an unnecessary level of indentation. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d837e219da
commit
0f3dda9f7f
@@ -274,17 +274,19 @@ static int usb_probe_interface(struct device *dev)
|
||||
intf->needs_binding = 0;
|
||||
|
||||
if (usb_device_is_owned(udev))
|
||||
return -ENODEV;
|
||||
return error;
|
||||
|
||||
if (udev->authorized == 0) {
|
||||
dev_err(&intf->dev, "Device is not authorized for usage\n");
|
||||
return -ENODEV;
|
||||
return error;
|
||||
}
|
||||
|
||||
id = usb_match_id(intf, driver->id_table);
|
||||
if (!id)
|
||||
id = usb_match_dynamic_id(intf, driver);
|
||||
if (id) {
|
||||
if (!id)
|
||||
return error;
|
||||
|
||||
dev_dbg(dev, "%s - got id\n", __func__);
|
||||
|
||||
error = usb_autoresume_device(udev);
|
||||
@@ -309,7 +311,6 @@ static int usb_probe_interface(struct device *dev)
|
||||
desc.bInterfaceNumber, 0);
|
||||
if (error < 0)
|
||||
goto err;
|
||||
|
||||
intf->needs_altsetting0 = 0;
|
||||
}
|
||||
|
||||
@@ -319,8 +320,6 @@ static int usb_probe_interface(struct device *dev)
|
||||
|
||||
intf->condition = USB_INTERFACE_BOUND;
|
||||
usb_autosuspend_device(udev);
|
||||
}
|
||||
|
||||
return error;
|
||||
|
||||
err:
|
||||
|
Reference in New Issue
Block a user