From: Axel Lin <axel.lin@ingics.com>
To: Mark Brown <broonie@kernel.org>
Cc: Chen-Yu Tsai <wens@csie.org>, Liam Girdwood <lgirdwood@gmail.com>,
linux-kernel@vger.kernel.org, Axel Lin <axel.lin@ingics.com>
Subject: [PATCH 1/2] regulator: axp20x: Remove unneeded NULL test against rdev
Date: Tue, 19 Mar 2019 11:36:07 +0800 [thread overview]
Message-ID: <20190319033608.6363-1-axel.lin@ingics.com> (raw)
rdev won't be NULL in .enable callback.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/regulator/axp20x-regulator.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/regulator/axp20x-regulator.c b/drivers/regulator/axp20x-regulator.c
index fba8f58ab769..8a366f66208e 100644
--- a/drivers/regulator/axp20x-regulator.c
+++ b/drivers/regulator/axp20x-regulator.c
@@ -437,9 +437,6 @@ static int axp20x_regulator_enable_regmap(struct regulator_dev *rdev)
struct axp20x_dev *axp20x = rdev_get_drvdata(rdev);
const struct regulator_desc *desc;
- if (!rdev)
- return -EINVAL;
-
desc = rdev->desc;
switch (axp20x->variant) {
--
2.17.1
next reply other threads:[~2019-03-19 3:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-19 3:36 Axel Lin [this message]
2019-03-19 3:36 ` [PATCH 2/2] regulator: axp20x: Use rdev_get_id at appropriate places Axel Lin
2019-03-19 3:39 ` Chen-Yu Tsai
2019-03-19 3:38 ` [PATCH 1/2] regulator: axp20x: Remove unneeded NULL test against rdev Chen-Yu Tsai
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=20190319033608.6363-1-axel.lin@ingics.com \
--to=axel.lin@ingics.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=wens@csie.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
all inboxes | Powered by JetHome®