Commit 2b974ee0 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman

usb: core: Use ACPI_SUCCESS() at appropriate places

Use ACPI_SUCCESS() to replace !ACPI_FAILURE(), this avoids additional operation.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200218191717.73512-1-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 24f77240
...@@ -187,7 +187,7 @@ usb_acpi_find_companion_for_port(struct usb_port *port_dev) ...@@ -187,7 +187,7 @@ usb_acpi_find_companion_for_port(struct usb_port *port_dev)
handle = adev->handle; handle = adev->handle;
status = acpi_get_physical_device_location(handle, &pld); 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 port_dev->location = USB_ACPI_LOCATION_VALID
| pld->group_token << 8 | pld->group_position; | pld->group_token << 8 | pld->group_position;
port_dev->connect_type = usb_acpi_get_connect_type(handle, pld); port_dev->connect_type = usb_acpi_get_connect_type(handle, pld);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment