From: Dan Carpenter <dan.carpenter@oracle.com>
To: Saravanan Sekar <sravanhome@gmail.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH] regulator: mpq7920: Check the correct variable in mpq7920_regulator_register()
Date: Mon, 13 Jan 2020 15:59:33 +0300 [thread overview]
Message-ID: <20200113125805.xri6jqoxy2ldzqyg@kili.mountain> (raw)
There is a typo in the error checking. We should be checking
"->rdev[i]" instead of just "->rdev".
Fixes: 6501c1f54a17 ("regulator: mpq7920: add mpq7920 regulator driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/regulator/mpq7920.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/mpq7920.c b/drivers/regulator/mpq7920.c
index ab1b847c57e5..80f3131f0d1b 100644
--- a/drivers/regulator/mpq7920.c
+++ b/drivers/regulator/mpq7920.c
@@ -274,8 +274,8 @@ static inline int mpq7920_regulator_register(
info->rdev[i] = devm_regulator_register(info->dev, rdesc,
config);
- if (IS_ERR(info->rdev))
- return PTR_ERR(info->rdev);
+ if (IS_ERR(info->rdev[i]))
+ return PTR_ERR(info->rdev[i]);
}
return 0;
--
2.11.0
next reply other threads:[~2020-01-13 12:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-13 12:59 Dan Carpenter [this message]
2020-01-13 15:13 ` Applied "regulator: mpq7920: Check the correct variable in mpq7920_regulator_register()" to the regulator tree Mark Brown
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=20200113125805.xri6jqoxy2ldzqyg@kili.mountain \
--to=dan.carpenter@oracle.com \
--cc=broonie@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sravanhome@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).