[PATCH 1/2] regulator: tps65090: Use IS_ERR to check return valueof regulator_register

From: Axel Lin
Date: Fri Mar 23 2012 - 22:56:22 EST


regulator_register never returns NULL.

Signed-off-by: Axel Lin <axel.lin@xxxxxxxxx>
---
drivers/regulator/tps65090-regulator.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/regulator/tps65090-regulator.c b/drivers/regulator/tps65090-regulator.c
index 6c28e3a..470ca7e 100644
--- a/drivers/regulator/tps65090-regulator.c
+++ b/drivers/regulator/tps65090-regulator.c
@@ -153,7 +153,7 @@ static int __devinit tps65090_regulator_probe(struct platform_device *pdev)

rdev = regulator_register(&ri->desc, &pdev->dev,
&tps_pdata->regulator, ri, NULL);
- if (IS_ERR_OR_NULL(rdev)) {
+ if (IS_ERR(rdev)) {
dev_err(&pdev->dev, "failed to register regulator %s\n",
ri->desc.name);
return PTR_ERR(rdev);
--
1.7.5.4



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/