From: Zheng Yongjun <zhengyongjun3@huawei.com>
To: <dmitry.torokhov@gmail.com>, <linux-input@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Cc: Zheng Yongjun <zhengyongjun3@huawei.com>
Subject: [PATCH -next] input/rmi4: simplify the return expression of rmi_driver_of_probe()
Date: Thu, 10 Dec 2020 22:00:24 +0800 [thread overview]
Message-ID: <20201210140024.1665-1-zhengyongjun3@huawei.com> (raw)
Simplify the return expression.
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
drivers/input/rmi4/rmi_driver.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c
index 258d5fe3d395..eec5d926da25 100644
--- a/drivers/input/rmi4/rmi_driver.c
+++ b/drivers/input/rmi4/rmi_driver.c
@@ -991,14 +991,8 @@ static int rmi_driver_remove(struct device *dev)
static int rmi_driver_of_probe(struct device *dev,
struct rmi_device_platform_data *pdata)
{
- int retval;
-
- retval = rmi_of_property_read_u32(dev, &pdata->reset_delay_ms,
+ return rmi_of_property_read_u32(dev, &pdata->reset_delay_ms,
"syna,reset-delay-ms", 1);
- if (retval)
- return retval;
-
- return 0;
}
#else
static inline int rmi_driver_of_probe(struct device *dev,
--
2.22.0
next reply other threads:[~2020-12-10 14:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-10 14:00 Zheng Yongjun [this message]
2020-12-11 6:38 ` [PATCH -next] input/rmi4: simplify the return expression of rmi_driver_of_probe() Dmitry Torokhov
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=20201210140024.1665-1-zhengyongjun3@huawei.com \
--to=zhengyongjun3@huawei.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@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).