platform/x86: toshiba_acpi: Fix the wrong variable assignment
authorKaixu Xia <kaixuxia@tencent.com>
Sun, 22 Nov 2020 05:49:37 +0000 (13:49 +0800)
committerHans de Goede <hdegoede@redhat.com>
Tue, 24 Nov 2020 12:07:01 +0000 (13:07 +0100)
commit5af8be6b0c7e49124cd04ad144d3aae615e3daea
tree7f39210dfafccb829ca19018ad4e156559b646cb
parentb970b732ff4f0d9c88361a3e5bb239f7822f719b
platform/x86: toshiba_acpi: Fix the wrong variable assignment

The commit 78429e55e4057 ("platform/x86: toshiba_acpi: Clean up
variable declaration") cleans up variable declaration in
video_proc_write(). Seems it does the variable assignment in the
wrong place, this results in dead code and changes the source code
logic. Fix it by doing the assignment at the beginning of the funciton.

Fixes: 78429e55e4057 ("platform/x86: toshiba_acpi: Clean up variable declaration")
Reported-by: Tosk Robot <tencent_os_robot@tencent.com>
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
Link: https://lore.kernel.org/r/1606024177-16481-1-git-send-email-kaixuxia@tencent.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/toshiba_acpi.c