diff options
author | Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> | 2014-06-01 14:58:52 +0200 |
---|---|---|
committer | Matthew Garrett <matthew.garrett@nebula.com> | 2014-06-10 19:11:08 -0400 |
commit | 8ad3be1eacbe252b93f5a0478413774308f3dbfb (patch) | |
tree | c25b9fe27facb4cc8689b4328ac72ce063a9d8d9 | |
parent | 14627e36121c90b9a794ab0ea3195efa4c23373e (diff) |
platform: x86: asus-wmi.c: Cleaning up uninitialized variables
There is a risk that the variable will be used without being initialized.
This was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
-rw-r--r-- | drivers/platform/x86/asus-wmi.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c index 91ef69a52263..3c6ccedc82b6 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c @@ -266,7 +266,7 @@ static int asus_wmi_evaluate_method(u32 method_id, u32 arg0, u32 arg1, struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL }; acpi_status status; union acpi_object *obj; - u32 tmp; + u32 tmp = 0; status = wmi_evaluate_method(ASUS_WMI_MGMT_GUID, 1, method_id, &input, &output); @@ -277,8 +277,6 @@ static int asus_wmi_evaluate_method(u32 method_id, u32 arg0, u32 arg1, obj = (union acpi_object *)output.pointer; if (obj && obj->type == ACPI_TYPE_INTEGER) tmp = (u32) obj->integer.value; - else - tmp = 0; if (retval) *retval = tmp; |