* [PATCH] regulator: tps80031: Use IS_ERR to check return value of regulator_register()
@ 2013-01-25 13:29 Axel Lin
2013-01-26 7:56 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2013-01-25 13:29 UTC (permalink / raw)
To: Mark Brown; +Cc: Laxman Dewangan, Liam Girdwood, linux-kernel
regulator_register() does not return NULL, it returns ERR_PTR on error.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/regulator/tps80031-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/tps80031-regulator.c b/drivers/regulator/tps80031-regulator.c
index b15d711..9019d0e 100644
--- a/drivers/regulator/tps80031-regulator.c
+++ b/drivers/regulator/tps80031-regulator.c
@@ -728,7 +728,7 @@ static int tps80031_regulator_probe(struct platform_device *pdev)
}
}
rdev = regulator_register(&ri->rinfo->desc, &config);
- if (IS_ERR_OR_NULL(rdev)) {
+ if (IS_ERR(rdev)) {
dev_err(&pdev->dev,
"register regulator failed %s\n",
ri->rinfo->desc.name);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] regulator: tps80031: Use IS_ERR to check return value of regulator_register()
2013-01-25 13:29 [PATCH] regulator: tps80031: Use IS_ERR to check return value of regulator_register() Axel Lin
@ 2013-01-26 7:56 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2013-01-26 7:56 UTC (permalink / raw)
To: Axel Lin; +Cc: Laxman Dewangan, Liam Girdwood, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 150 bytes --]
On Fri, Jan 25, 2013 at 09:29:41PM +0800, Axel Lin wrote:
> regulator_register() does not return NULL, it returns ERR_PTR on error.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-26 8:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-25 13:29 [PATCH] regulator: tps80031: Use IS_ERR to check return value of regulator_register() Axel Lin
2013-01-26 7:56 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox