From: Jing Xiangfeng <jingxiangfeng@huawei.com>
To: <srinivas.pandruvada@linux.intel.com>, <jikos@kernel.org>,
<benjamin.tissoires@redhat.com>
Cc: <linux-input@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<jingxiangfeng@huawei.com>
Subject: [PATCH] HID: intel-ish-hid: Remove unnecessary assignment to variable rv
Date: Tue, 10 Nov 2020 11:20:49 +0800 [thread overview]
Message-ID: <20201110032049.187404-1-jingxiangfeng@huawei.com> (raw)
This assignment to rv is unused in an error path. So remove it.
Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
---
drivers/hid/intel-ish-hid/ishtp-hid.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/hid/intel-ish-hid/ishtp-hid.c b/drivers/hid/intel-ish-hid/ishtp-hid.c
index b8aae69ad15d..393bed0abee9 100644
--- a/drivers/hid/intel-ish-hid/ishtp-hid.c
+++ b/drivers/hid/intel-ish-hid/ishtp-hid.c
@@ -211,10 +211,8 @@ int ishtp_hid_probe(unsigned int cur_hid_dev,
struct ishtp_hid_data *hid_data;
hid = hid_allocate_device();
- if (IS_ERR(hid)) {
- rv = PTR_ERR(hid);
- return -ENOMEM;
- }
+ if (IS_ERR(hid))
+ return PTR_ERR(hid);
hid_data = kzalloc(sizeof(*hid_data), GFP_KERNEL);
if (!hid_data) {
--
2.17.1
next reply other threads:[~2020-11-10 3:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-10 3:20 Jing Xiangfeng [this message]
2020-11-25 12:57 ` [PATCH] HID: intel-ish-hid: Remove unnecessary assignment to variable rv Jiri Kosina
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=20201110032049.187404-1-jingxiangfeng@huawei.com \
--to=jingxiangfeng@huawei.com \
--cc=benjamin.tissoires@redhat.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=srinivas.pandruvada@linux.intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.