Skip to content

Commit

Permalink
usb: core: Use ACPI_SUCCESS() at appropriate places
Browse files Browse the repository at this point in the history
Use ACPI_SUCCESS() to replace !ACPI_FAILURE(), this avoids additional operation.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200218191717.73512-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Andy Shevchenko authored and Greg Kroah-Hartman committed Feb 19, 2020
1 parent 24f7724 commit 2b974ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/core/usb-acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ usb_acpi_find_companion_for_port(struct usb_port *port_dev)

handle = adev->handle;
status = acpi_get_physical_device_location(handle, &pld);
if (!ACPI_FAILURE(status) && pld) {
if (ACPI_SUCCESS(status) && pld) {
port_dev->location = USB_ACPI_LOCATION_VALID
| pld->group_token << 8 | pld->group_position;
port_dev->connect_type = usb_acpi_get_connect_type(handle, pld);
Expand Down

0 comments on commit 2b974ee

Please sign in to comment.