* [PATCH] regulator: vexpress: Use PTR_ERR_OR_ZERO() in vexpress_regulator_probe()
@ 2019-09-07 11:23 Markus Elfring
2019-09-18 10:44 ` Sudeep Holla
0 siblings, 1 reply; 2+ messages in thread
From: Markus Elfring @ 2019-09-07 11:23 UTC (permalink / raw)
To: linux-arm-kernel, Liam Girdwood, Liviu Dudau, Lorenzo Pieralisi,
Mark Brown, Sudeep Holla
Cc: kernel-janitors, LKML
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 7 Sep 2019 13:07:22 +0200
Simplify this function implementation by using a known function.
Generated by: scripts/coccinelle/api/ptr_ret.cocci
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/regulator/vexpress-regulator.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/regulator/vexpress-regulator.c b/drivers/regulator/vexpress-regulator.c
index 1235f46e633e..5d39663efcaa 100644
--- a/drivers/regulator/vexpress-regulator.c
+++ b/drivers/regulator/vexpress-regulator.c
@@ -75,10 +75,7 @@ static int vexpress_regulator_probe(struct platform_device *pdev)
config.of_node = pdev->dev.of_node;
rdev = devm_regulator_register(&pdev->dev, desc, &config);
- if (IS_ERR(rdev))
- return PTR_ERR(rdev);
-
- return 0;
+ return PTR_ERR_OR_ZERO(rdev);
}
static const struct of_device_id vexpress_regulator_of_match[] = {
--
2.23.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] regulator: vexpress: Use PTR_ERR_OR_ZERO() in vexpress_regulator_probe()
2019-09-07 11:23 [PATCH] regulator: vexpress: Use PTR_ERR_OR_ZERO() in vexpress_regulator_probe() Markus Elfring
@ 2019-09-18 10:44 ` Sudeep Holla
0 siblings, 0 replies; 2+ messages in thread
From: Sudeep Holla @ 2019-09-18 10:44 UTC (permalink / raw)
To: Markus Elfring, Mark Brown
Cc: Lorenzo Pieralisi, kernel-janitors, Liviu Dudau, Liam Girdwood,
LKML, Sudeep Holla, linux-arm-kernel
On Sat, Sep 07, 2019 at 01:23:08PM +0200, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sat, 7 Sep 2019 13:07:22 +0200
>
> Simplify this function implementation by using a known function.
>
> Generated by: scripts/coccinelle/api/ptr_ret.cocci
>
Acked-by: Sudeep Holla <sudeep.holla@arm.comi>
Hi Mark,
I assume you can take this via your tree.
--
Regards,
Sudeep
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-09-18 10:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-07 11:23 [PATCH] regulator: vexpress: Use PTR_ERR_OR_ZERO() in vexpress_regulator_probe() Markus Elfring
2019-09-18 10:44 ` Sudeep Holla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).