From patchwork Sun Dec 30 19:40:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 154620 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp10246321ljp; Sun, 30 Dec 2018 11:41:07 -0800 (PST) X-Google-Smtp-Source: ALg8bN5QAd4Qq/6JzFx9i08s+YmF9LWSaRJU91cKXlUD7mMEbMZZG/CVir1YR2U75xtVcSGU7U4U X-Received: by 2002:a63:2263:: with SMTP id t35mr5356930pgm.69.1546198867106; Sun, 30 Dec 2018 11:41:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546198867; cv=none; d=google.com; s=arc-20160816; b=Wyvq3L0se97+StWToSxZiBAvoczUpX7i5RxAx4oqdiewrek8YGtMFYnzRNzjXZRW8+ Lf+47A7mgYzuK9rJ2ZyiLMGzzsjnaqslKQuzi2Rv3IW2WeEcDRSEPessbv6wOnpjOF5U b9v/MBA1iDyVEa4rqUKGtqMxfPPkPWnOanKAkKURRJp2scNHgYpDupmcBNggm7ghJGZc fNzvocyGQbE0M5tPiaPt4f6TET3R+Dk1WAv4DObnhk0kRFrjLVey8pYXX8xGORNpFhYF 2p2oqNOUJCqzRbbJnVJtZU9OjP7cqQIO2af1gZvCN6OXKCMULWZK4ifk3IFFW+Yw/47g L43w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=QS3IOU6D3pv4uKflv/xd6ZLdIT4siG9wnckotixYr+Q=; b=HIEvtSujsVvLM39fcyjYjkViHuCmNiOEZUl8mHxFdpCprDLO9f6TbWtS2FeEO17t8o or8deVes23GdePwPnfBNZwFmqm11a+vXksmDbua3lVK/9WoubQJkHTdgPxBrO7bK5zD0 +Ytp3qD90LLVVHFR1zK65sxPklU3tdTfY2qmKAiB5gR+Nr0SVtqtZjdQtHjos1jyzxRL WvyV55Tc4mnV7VDN78+J0HSKsIrbJ2TbvMSBEMD7sXMba0I98hRRqKdfelfOb3ZJc5lh 328Z80t13f7EKT7ypVsRBNgXTOiWX2mqYGmTpGvQGxIa5s2I0DrfMStaoGTEY7juxfWo vLxg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a193si11150373pfa.214.2018.12.30.11.41.06; Sun, 30 Dec 2018 11:41:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726737AbeL3TlD (ORCPT + 31 others); Sun, 30 Dec 2018 14:41:03 -0500 Received: from mx2.suse.de ([195.135.220.15]:39040 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726321AbeL3TlD (ORCPT ); Sun, 30 Dec 2018 14:41:03 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 911C7AE1D; Sun, 30 Dec 2018 19:41:01 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-lpwan@lists.infradead.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ben Whitten , Ben Whitten , =?utf-8?q?Andreas_F=C3=A4rber?= Subject: [PATCH lora-next] net: lora: sx125x: Add error handling for clock-output-names Date: Sun, 30 Dec 2018 20:40:54 +0100 Message-Id: <20181230194054.11676-1-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <491d1a46-c112-1106-9f25-14149f0dcbd0@suse.de> References: <491d1a46-c112-1106-9f25-14149f0dcbd0@suse.de> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ben Whitten Split off from style changes. Signed-off-by: Ben Whitten Signed-off-by: Andreas Färber --- drivers/net/lora/sx125x.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- 2.16.4 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)) {