From: Alexandru Gheorghiu Date: Mon, 18 Mar 2013 21:35:31 +0000 (+0200) Subject: regulator: fan53555: Use PTR_RET function X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=eb8ad609912cd468b23467892a1c80ff2d610716;p=deliverable%2Flinux.git 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 Signed-off-by: Mark Brown --- 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, rdesc->owner = THIS_MODULE; di->rdev = regulator_register(&di->desc, config); - if (IS_ERR(di->rdev)) - return PTR_ERR(di->rdev); - return 0; + return PTR_RET(di->rdev); }