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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181230194054.11676-1-afaerber@suse.de>
Date:   Sun, 30 Dec 2018 20:40:54 +0100
From:   Andreas Färber <afaerber@...e.de>
To:     linux-lpwan@...ts.infradead.org
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        Ben Whitten <ben.whitten@...il.com>,
        Ben Whitten <ben.whitten@...rdtech.com>,
        Andreas Färber <afaerber@...e.de>
Subject: [PATCH lora-next] net: lora: sx125x: Add error handling for clock-output-names

From: Ben Whitten <ben.whitten@...il.com>

Split off from style changes.

Signed-off-by: Ben Whitten <ben.whitten@...rdtech.com>
Signed-off-by: Andreas Färber <afaerber@...e.de>
---
 drivers/net/lora/sx125x.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/lora/sx125x.c b/drivers/net/lora/sx125x.c
index b7ca782b9386..2c48301a12ab 100644
--- a/drivers/net/lora/sx125x.c
+++ b/drivers/net/lora/sx125x.c
@@ -149,8 +149,12 @@ static int sx125x_register_clock_provider(struct sx125x_priv *priv)
 	init.num_parents = 1;
 	priv->clkout_hw.init = &init;
 
-	of_property_read_string_index(dev->of_node, "clock-output-names", 0,
-			&init.name);
+	ret = of_property_read_string_index(dev->of_node, "clock-output-names", 0,
+					    &init.name);
+	if (ret) {
+		dev_err(dev, "unable to find output name\n");
+		return ret;
+	}
 
 	priv->clkout = devm_clk_register(dev, &priv->clkout_hw);
 	if (IS_ERR(priv->clkout)) {
-- 
2.16.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ