]> git.baikalelectronics.ru Git - kernel.git/commit
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>
Thu, 26 Nov 2020 14:48:46 +0000 (15:48 +0100)
commitec476280f4d74ad74813ff839c76ed1b03267748
treeb6f72924eddb0fad873dc82d8fd5bfc9c031b7ba
parentce1cda81dac09d0eb99afe0302eff588ca1bfa63
platform/x86: toshiba_acpi: Fix the wrong variable assignment

The commit 01a7348965b41 ("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: 01a7348965b41 ("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