summaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorYurii Pavlovskyi <yurii.pavlovskyi@gmail.com>2019-05-14 21:03:50 +0200
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2019-06-17 15:22:47 +0300
commit1827f3f06aafe67c1d273025a26390d9d2bdd3f7 (patch)
tree8605c8fd8704ea90f9702696c7829dc776411295 /drivers/platform
parent2b5767bf86ea261ed98dda96c91e3eee052887b8 (diff)
downloadblackbird-op-linux-1827f3f06aafe67c1d273025a26390d9d2bdd3f7.tar.gz
blackbird-op-linux-1827f3f06aafe67c1d273025a26390d9d2bdd3f7.zip
platform/x86: asus-wmi: Refactor error handling
Remove exit label as it is only used once from the point in code where no cleanup is required and return can be called immediately. Signed-off-by: Yurii Pavlovskyi <yurii.pavlovskyi@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/asus-wmi.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 83bf145e9ca5..5cbd7fc365b3 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -255,7 +255,7 @@ static int asus_wmi_evaluate_method3(u32 method_id,
&input, &output);
if (ACPI_FAILURE(status))
- goto exit;
+ return -EIO;
obj = (union acpi_object *)output.pointer;
if (obj && obj->type == ACPI_TYPE_INTEGER)
@@ -266,10 +266,6 @@ static int asus_wmi_evaluate_method3(u32 method_id,
kfree(obj);
-exit:
- if (ACPI_FAILURE(status))
- return -EIO;
-
if (tmp == ASUS_WMI_UNSUPPORTED_METHOD)
return -ENODEV;
OpenPOWER on IntegriCloud