diff options
author | Alexandru Gheorghiu <gheorghiuandru@gmail.com> | 2013-03-18 17:35:31 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-03-20 09:30:12 -0400 |
commit | eb8ad609912cd468b23467892a1c80ff2d610716 (patch) | |
tree | 8bd69ef29c2ed864c284bc825a1c8fc82cd92b60 | |
parent | a937536b868b8369b98967929045f1df54234323 (diff) |
regulator: fan53555: Use PTR_RET function
Used PTR_RET function instead of IS_ERR and PTR_ERR.
Patch found using coccinelle.
Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r-- | drivers/regulator/fan53555.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c index 9165b0c40ed3..f0e1ae52bb05 100644 --- a/drivers/regulator/fan53555.c +++ b/drivers/regulator/fan53555.c | |||
@@ -219,9 +219,7 @@ static int fan53555_regulator_register(struct fan53555_device_info *di, | |||
219 | rdesc->owner = THIS_MODULE; | 219 | rdesc->owner = THIS_MODULE; |
220 | 220 | ||
221 | di->rdev = regulator_register(&di->desc, config); | 221 | di->rdev = regulator_register(&di->desc, config); |
222 | if (IS_ERR(di->rdev)) | 222 | return PTR_RET(di->rdev); |
223 | return PTR_ERR(di->rdev); | ||
224 | return 0; | ||
225 | 223 | ||
226 | } | 224 | } |
227 | 225 | ||