usb: core: Make use of acpi_evaluate_object() status
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 18 Feb 2020 18:52:07 +0000 (20:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Feb 2020 10:08:52 +0000 (11:08 +0100)
commit24f772409b2426a6545eb0d96b297b8913d70539
tree179a9c0352b4020c2c469f2a1530406815c906a0
parent10892847de816edf4f8f2151174dc557c4a3f63f
usb: core: Make use of acpi_evaluate_object() status

Compiler is not happy about dangling variable:

.../core/usb-acpi.c: In function ‘usb_acpi_get_connect_type’:
.../core/usb-acpi.c:90:14: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]
   90 |  acpi_status status;
      |              ^~~~~~

Make use of it by checking the status and bail out in case of error.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200218185207.62527-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/usb-acpi.c