Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Andy Shevchenko and committed by
Greg Kroah-Hartman
2b974ee0 24f77240

+1 -1
+1 -1
drivers/usb/core/usb-acpi.c
··· 187 187 188 188 handle = adev->handle; 189 189 status = acpi_get_physical_device_location(handle, &pld); 190 - if (!ACPI_FAILURE(status) && pld) { 190 + if (ACPI_SUCCESS(status) && pld) { 191 191 port_dev->location = USB_ACPI_LOCATION_VALID 192 192 | pld->group_token << 8 | pld->group_position; 193 193 port_dev->connect_type = usb_acpi_get_connect_type(handle, pld);