lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230221024541.105199-1-yang.lee@linux.alibaba.com>
Date:   Tue, 21 Feb 2023 10:45:41 +0800
From:   Yang Li <yang.lee@...ux.alibaba.com>
To:     kuba@...nel.org
Cc:     davem@...emloft.net, wg@...ndegger.com, mkl@...gutronix.de,
        edumazet@...gle.com, pabeni@...hat.com, linux-can@...r.kernel.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        Yang Li <yang.lee@...ux.alibaba.com>
Subject: [PATCH -next] can: mscan: mpc5xxx: Use of_property_present() helper

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@...ux.alibaba.com>
---
 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ