mirror of
https://github.com/wessel-novacustom/clevo-keyboard.git
synced 2024-11-15 11:43:59 +01:00
Control flow cleanup: avoid goto + better error messages
This commit is contained in:
parent
bdab3dc13e
commit
6314e4704f
|
@ -274,8 +274,8 @@ static int tuxedo_evaluate_wmi_method(u32 method_id, u32 arg, u32 * retval)
|
||||||
&acpi_input, &acpi_output);
|
&acpi_input, &acpi_output);
|
||||||
|
|
||||||
if (unlikely(ACPI_FAILURE(status))) {
|
if (unlikely(ACPI_FAILURE(status))) {
|
||||||
TUXEDO_ERROR("evaluate method error");
|
TUXEDO_ERROR("evaluate_wmi_method error");
|
||||||
goto exit;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
obj = (union acpi_object *)acpi_output.pointer;
|
obj = (union acpi_object *)acpi_output.pointer;
|
||||||
|
@ -292,12 +292,6 @@ static int tuxedo_evaluate_wmi_method(u32 method_id, u32 arg, u32 * retval)
|
||||||
}
|
}
|
||||||
|
|
||||||
kfree(obj);
|
kfree(obj);
|
||||||
|
|
||||||
exit:
|
|
||||||
if (unlikely(ACPI_FAILURE(status))) {
|
|
||||||
return -EIO;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue