summaryrefslogtreecommitdiff
path: root/drivers/usb/core/usb-acpi.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2020-02-18 22:17:17 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-02-19 13:08:52 +0300
commit2b974ee056a2a55e120071d014b31cb330117577 (patch)
treed54c9a9fc029db20ca4084dba2f8df5d8af124df /drivers/usb/core/usb-acpi.c
parent24f772409b2426a6545eb0d96b297b8913d70539 (diff)
downloadlinux-2b974ee056a2a55e120071d014b31cb330117577.tar.xz
usb: core: Use ACPI_SUCCESS() at appropriate places
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>
Diffstat (limited to 'drivers/usb/core/usb-acpi.c')
-rw-r--r--drivers/usb/core/usb-acpi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/core/usb-acpi.c b/drivers/usb/core/usb-acpi.c
index 99d41dc26e08..50b2fc7fcc0e 100644
--- a/drivers/usb/core/usb-acpi.c
+++ b/drivers/usb/core/usb-acpi.c
@@ -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);