]> git.ipfire.org Git - people/arne_f/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Dec 2020 07:52:00 +0000 (08:52 +0100)
commitbd12eb870372b9e4365e63d3b3fba45d0ca1a54d
tree0825c7f8448063b6951d2aae23755a07bef25532
parent83bec121880cc0cf36c9029b0d996cffd7b02fed
platform/x86: toshiba_acpi: Fix the wrong variable assignment

[ Upstream commit 2a72c46ac4d665614faa25e267c3fb27fb729ed7 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/platform/x86/toshiba_acpi.c