Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2470377pxb; Tue, 9 Mar 2021 03:25:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJw9dV844yJZVu5vaQSV2W4f67/2dB7W+jmE+WwFJGUHMPy468EKp8dQ3W8aSEqDberQ6e1q X-Received: by 2002:a17:907:76b3:: with SMTP id jw19mr19480549ejc.202.1615289158642; Tue, 09 Mar 2021 03:25:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615289158; cv=none; d=google.com; s=arc-20160816; b=OecaGWzWu84bNfTghwWL3V51tI8/GAFAAi6ZHTLvefzqRMAA4d1tW+X2988h5fIajV W4ucRf/UcMfEexmvJb6ipYXCvRWxaf+xL9TT9b01W7woh0yf5p/1tN2jWxOG5zMavj5V /dVIragWb6Oz9cweRI9Ks+sT/cI0YF+F+qQf++VkX79JPgmQn/Prt18FD4Mz+iE0xduh NBQHx1XU5owVI3KQIqB0Xx2EFLlMABDx+rfNVmiQTLpUaPTotemf+5kQt0asZs3uWOde M3i76abfEuprp/R0M4QMxzAWnPWqSeJH9SFa0IRIk+wpSy4bKArvXPSHAhsYDAB8T2vd Iy2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=Rj9WDCu9McMNrkp/rUzYvfZc2cl1YzCk9Gb779QwHQc=; b=y3ZNXvFdbUL/FOP6HguL0C5/vcx9EjVBz4KMfmAm55E8HSaKhfFgTm4PiaAQ3lG5+H SOmGWqzSP8YrtV/rt9sdRUTrp1Hu7TqPY6vk5P/menXBH2dTTPvBfWro6CTiUpBgL0eY m0VwaEceNafbavZdTGthWwsBoKHnUm856F3LkVNqP43L0d9A+sd4Pcb8NGImjWWw3zyP OJiz8Sj4Zq07bifAcBOyNrWjXi0Rwo9RJPPb1G9HgybOpTJhH57Ga89GZSOLplDvI+1Y WC2cWUm4nBW4Qu3uj4L5/fKvSRGiJAzuzJnPriFjKrnydZsO4S33cbevGE4srMjFsOVU hjPw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o16si8788087ejb.259.2021.03.09.03.25.35; Tue, 09 Mar 2021 03:25:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230285AbhCILYj (ORCPT + 99 others); Tue, 9 Mar 2021 06:24:39 -0500 Received: from mga04.intel.com ([192.55.52.120]:56964 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230149AbhCILYW (ORCPT ); Tue, 9 Mar 2021 06:24:22 -0500 IronPort-SDR: tG2UU/fsEWY/b4m9Q9zJV9Eapjy/p+vMbfCPt/9PiTGnKMc5wzC4FfFz9a/PbEnkhRwcDVRsp7 /Dw9788PT9Iw== X-IronPort-AV: E=McAfee;i="6000,8403,9917"; a="185828127" X-IronPort-AV: E=Sophos;i="5.81,234,1610438400"; d="scan'208";a="185828127" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2021 03:24:19 -0800 IronPort-SDR: fsvzNJC82dYmfB6ubVDsgfcIXlv6kVcQI7+aBt/F2KW94XA7NDEOlz/CenHUIivY6pOdsPxhRz w4CDI3tSK5YQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,234,1610438400"; d="scan'208";a="437864953" Received: from black.fi.intel.com ([10.237.72.28]) by FMSMGA003.fm.intel.com with ESMTP; 09 Mar 2021 03:24:17 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 691851EC; Tue, 9 Mar 2021 13:24:18 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , linux-kernel@vger.kernel.org Cc: Rodolfo Giometti , Ryan Govostes , Greg Kroah-Hartman Subject: [PATCH resend v1 1/7] pps: clients: gpio: Bail out on error when requesting GPIO echo line Date: Tue, 9 Mar 2021 13:23:57 +0200 Message-Id: <20210309112403.36633-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When requesting optional GPIO echo line, bail out on error, so user will know that something wrong with the existing property. Signed-off-by: Andy Shevchenko --- drivers/pps/clients/pps-gpio.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/pps/clients/pps-gpio.c b/drivers/pps/clients/pps-gpio.c index e0de1df2ede0..f89c31aa66f1 100644 --- a/drivers/pps/clients/pps-gpio.c +++ b/drivers/pps/clients/pps-gpio.c @@ -119,12 +119,12 @@ static int pps_gpio_setup(struct platform_device *pdev) data->echo_pin = devm_gpiod_get_optional(&pdev->dev, "echo", GPIOD_OUT_LOW); - if (data->echo_pin) { - if (IS_ERR(data->echo_pin)) { - dev_err(&pdev->dev, "failed to request ECHO GPIO\n"); - return PTR_ERR(data->echo_pin); - } + if (IS_ERR(data->echo_pin)) { + dev_err(&pdev->dev, "failed to request ECHO GPIO\n"); + return PTR_ERR(data->echo_pin); + } + if (data->echo_pin) { ret = of_property_read_u32(np, "echo-active-ms", &value); -- 2.30.1