* [PATCH -next] iregulator: of: fix a NULL vs IS_ERR() check in of_regulator_bulk_get_all()
@ 2022-11-22 8:22 Peng Wu
2022-11-22 19:10 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Peng Wu @ 2022-11-22 8:22 UTC (permalink / raw)
To: lgirdwood, broonie, clabbe; +Cc: linux-kernel, liwei391, Peng Wu
The regulator_get() function never returns NULL. It returns error pointers.
Fixes: 27b9ecc7a9ba ("regulator: Add of_regulator_bulk_get_all")
Signed-off-by: Peng Wu <wupeng58@huawei.com>
---
drivers/regulator/of_regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
index 584c92f1a317..f7529f1bf8b2 100644
--- a/drivers/regulator/of_regulator.c
+++ b/drivers/regulator/of_regulator.c
@@ -767,7 +767,7 @@ int of_regulator_bulk_get_all(struct device *dev, struct device_node *np,
memcpy(name, prop->name, i);
name[i] = '\0';
tmp = regulator_get(dev, name);
- if (!tmp) {
+ if (IS_ERR(tmp)) {
ret = -EINVAL;
goto error;
}
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH -next] iregulator: of: fix a NULL vs IS_ERR() check in of_regulator_bulk_get_all()
2022-11-22 8:22 [PATCH -next] iregulator: of: fix a NULL vs IS_ERR() check in of_regulator_bulk_get_all() Peng Wu
@ 2022-11-22 19:10 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2022-11-22 19:10 UTC (permalink / raw)
To: clabbe, lgirdwood, Peng Wu; +Cc: linux-kernel, liwei391
On Tue, 22 Nov 2022 08:22:42 +0000, Peng Wu wrote:
> The regulator_get() function never returns NULL. It returns error pointers.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thanks!
[1/1] iregulator: of: fix a NULL vs IS_ERR() check in of_regulator_bulk_get_all()
commit: c957387c402a1a213102e38f92b800d7909a728d
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-22 19:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-22 8:22 [PATCH -next] iregulator: of: fix a NULL vs IS_ERR() check in of_regulator_bulk_get_all() Peng Wu
2022-11-22 19:10 ` Mark Brown
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®