Commit 1827f3f0 authored by Yurii Pavlovskyi's avatar Yurii Pavlovskyi Committed by Andy Shevchenko

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: default avatarYurii Pavlovskyi <yurii.pavlovskyi@gmail.com>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
parent 2b5767bf
......@@ -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;
......
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