[PATCH -next] can: mscan: mpc5xxx: Use of_property_present() helper

From: Yang Li
Date: Mon Feb 20 2023 - 21:45:52 EST


Use of_property_present() instead of of_get_property/of_find_property()
in places where we just need to test presence of a property.

Signed-off-by: Yang Li <yang.lee@xxxxxxxxxxxxxxxxx>
---
drivers/net/can/mscan/mpc5xxx_can.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c
index b0ed798ae70f..8981c223181f 100644
--- a/drivers/net/can/mscan/mpc5xxx_can.c
+++ b/drivers/net/can/mscan/mpc5xxx_can.c
@@ -315,7 +315,7 @@ static int mpc5xxx_can_probe(struct platform_device *ofdev)
priv->reg_base = base;
dev->irq = irq;

- clock_name = of_get_property(np, "fsl,mscan-clock-source", NULL);
+ clock_name = of_property_present(np, "fsl,mscan-clock-source");

priv->type = data->type;
priv->can.clock.freq = data->get_clock(ofdev, clock_name,
--
2.20.1.7.g153144c