From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
Abaci Robot <abaci@linux.alibaba.com>,
Hans de Goede <hdegoede@redhat.com>,
Sasha Levin <sashal@kernel.org>,
platform-driver-x86@vger.kernel.org
Subject: [PATCH AUTOSEL 4.4 6/7] platform/x86: toshiba_acpi: Fix missing error code in toshiba_acpi_setup_keyboard()
Date: Mon, 5 Jul 2021 11:32:06 -0400 [thread overview]
Message-ID: <20210705153208.1522553-6-sashal@kernel.org> (raw)
In-Reply-To: <20210705153208.1522553-1-sashal@kernel.org>
From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
[ Upstream commit 28e367127718a9cb85d615a71e152f7acee41bfc ]
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>
---
drivers/platform/x86/toshiba_acpi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index 1ff95b5a429d..974d4ac78d10 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -2448,6 +2448,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;
}
--
2.30.2
next prev parent reply other threads:[~2021-07-05 15:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-05 15:32 [PATCH AUTOSEL 4.4 1/7] ACPI: processor idle: Fix up C-state latency if not ordered Sasha Levin
2021-07-05 15:32 ` [PATCH AUTOSEL 4.4 2/7] block_dump: remove block_dump feature in mark_inode_dirty() Sasha Levin
2021-07-05 15:32 ` [PATCH AUTOSEL 4.4 3/7] fs: dlm: cancel work sync othercon Sasha Levin
2021-07-05 15:32 ` [PATCH AUTOSEL 4.4 4/7] random32: Fix implicit truncation warning in prandom_seed_state() Sasha Levin
2021-07-05 15:32 ` [PATCH AUTOSEL 4.4 5/7] ACPI: bus: Call kobject_put() in acpi_init() error path Sasha Levin
2021-07-05 15:32 ` Sasha Levin [this message]
2021-07-05 15:32 ` [PATCH AUTOSEL 4.4 7/7] ia64: mca_drv: fix incorrect array size calculation Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210705153208.1522553-6-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=abaci@linux.alibaba.com \
--cc=hdegoede@redhat.com \
--cc=jiapeng.chong@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).