Skip to content

Commit

Permalink
platform/x86: toshiba_acpi: Fix missing error code in toshiba_acpi_se…
Browse files Browse the repository at this point in the history
…tup_keyboard()

[ Upstream commit 28e3671 ]

The error code is missing in this code scenario, add the error code
'-EINVAL' to the return value 'error'.

Eliminate the follow smatch warning:

drivers/platform/x86/toshiba_acpi.c:2834 toshiba_acpi_setup_keyboard()
warn: missing error code 'error'.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Link: https://lore.kernel.org/r/1622628348-87035-1-git-send-email-jiapeng.chong@linux.alibaba.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Jiapeng Chong authored and gregkh committed Jul 14, 2021
1 parent 6632da0 commit c74f855
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/platform/x86/toshiba_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2831,6 +2831,7 @@ static int toshiba_acpi_setup_keyboard(struct toshiba_acpi_dev *dev)

if (!dev->info_supported && !dev->system_event_supported) {
pr_warn("No hotkey query interface found\n");
error = -EINVAL;
goto err_remove_filter;
}

Expand Down

0 comments on commit c74f855

Please sign in to comment.