From: Jiaxun Yang <jiaxun.yang@flygoat.com>
To: Ike Panhc <ike.pan@canonical.com>
Cc: Darren Hart <dvhart@infradead.org>,
Andy Shevchenko <andy@infradead.org>,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org,
Roger Jargoyhen <rjargoyhen@gmail.com>,
Jiaxun Yang <jiaxun.yang@flygoat.com>
Subject: [PATCH 1/4] platform/x86: ideapad-laptop: Remove unnesscary else
Date: Sat, 2 Dec 2017 21:45:31 +0800 [thread overview]
Message-ID: <20171202134534.3252-1-jiaxun.yang@flygoat.com> (raw)
To deal with checkpatch warning:
WARNING: else is not generally useful after a break or return
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
drivers/platform/x86/ideapad-laptop.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
index 53ab4e0f8962..9f2a4bc58df0 100644
--- a/drivers/platform/x86/ideapad-laptop.c
+++ b/drivers/platform/x86/ideapad-laptop.c
@@ -124,10 +124,10 @@ static int read_method_int(acpi_handle handle, const char *method, int *val)
if (ACPI_FAILURE(status)) {
*val = -1;
return -1;
- } else {
- *val = result;
- return 0;
}
+ *val = result;
+ return 0;
+
}
static int method_gbmd(acpi_handle handle, unsigned long *ret)
@@ -164,10 +164,10 @@ static int method_vpcr(acpi_handle handle, int cmd, int *ret)
if (ACPI_FAILURE(status)) {
*ret = -1;
return -1;
- } else {
- *ret = result;
- return 0;
}
+ *ret = result;
+ return 0;
+
}
static int method_vpcw(acpi_handle handle, int cmd, int data)
--
2.14.1
next reply other threads:[~2017-12-02 13:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-02 13:45 Jiaxun Yang [this message]
2017-12-02 13:45 ` [PATCH 2/4] platform/x86: ideapad-laptop: Use __func__ instead of write_ec_cmd in pr_err Jiaxun Yang
2017-12-02 13:45 ` [PATCH 3/4] platform/x86: ideapad-laptop: use kstrto instead of sscanf and do clean up Jiaxun Yang
2017-12-08 23:39 ` Darren Hart
2017-12-02 13:45 ` [PATCH 4/4] platform/x86: ideapad-laptop: add lenovo RESCUER R720-15IKBN to no_hw_rfkill_list Jiaxun Yang
2017-12-08 23:41 ` [PATCH 1/4] platform/x86: ideapad-laptop: Remove unnesscary else Darren Hart
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=20171202134534.3252-1-jiaxun.yang@flygoat.com \
--to=jiaxun.yang@flygoat.com \
--cc=andy@infradead.org \
--cc=dvhart@infradead.org \
--cc=ike.pan@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rjargoyhen@gmail.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 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).