Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2506415pxb; Tue, 9 Mar 2021 04:25:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJyCZoYf4dz9+SSm/3zBLhqtEywaiRgr7tuqs+Hvf5EB849IFtiO0zdUjful89EV1iAtXN8K X-Received: by 2002:a17:906:f2d2:: with SMTP id gz18mr19892949ejb.454.1615292752857; Tue, 09 Mar 2021 04:25:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615292752; cv=none; d=google.com; s=arc-20160816; b=btNxSzRHOG+AChe13tTw3390yO4nJl0aI3sRFzBiNkQbUoTJtKdKNNrxyGz8iF0Ure 30vgcrkLJ21bA5A7IYjxQui35DoA0sqgoAwxWrewUvUyJ/bRGB82My6MpU9vRc7VATpq vKrjKJBDt2brQJqnMtbWjXKKUq6oj1VYScqOr86ab0BJYC02yy9J5VQfGN1aOyK/wJWy hUTpacAVh4jlaUIDL2WzaXN470Q74aC3gXinBtEU0yRBLHGUxFELfoIb45NWMYqhtO1m 4wc7bkRbuvpG/3of8vjZhhj9MDkuEIGrQL80Y/5IR1oVIRqBssadf9qIDVoaSwZ0vRvR qDvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=u182nIvYFQlT5tQ0jcVbgWGBAIMz3vZpnd7oZjPfgiE=; b=mFMLBJ/pQYDvV4mts1idp48IxdOBPaz9Ir7bRGZOmymcXTRlskBF1PJ9GHzKUKcwuR 6o8MojTuNbcy0BTlOP4idsP04zNRkdakzRSOMAN3KFtRx4E3WwB/GIhR6lCTx9SEzVcD uZ7tI1hZKgkb1TRpOT6FwFC7XHOv8OpFEqUVMNf3w+sA/i6dAzCaXWxnJRRt+NL/dIl/ IRV47KC4lZbxmMGWuyCdAk8PTuF8Iz9prenY/oq/pz9bP7jKduo2+u+O5eHRIOi0gqDW uVBtX3Pkfvjzyjc50uFCzLfczxYLVy2w8CBf9mi8p9ey26BQY3HAkpHU/7WUatOsmTcw yu9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aruba.it header.s=a1 header.b=ijPGQdVn; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q17si3309743ejj.672.2021.03.09.04.25.30; Tue, 09 Mar 2021 04:25:52 -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; dkim=pass header.i=@aruba.it header.s=a1 header.b=ijPGQdVn; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230140AbhCIMYM (ORCPT + 99 others); Tue, 9 Mar 2021 07:24:12 -0500 Received: from smtpweb147.aruba.it ([62.149.158.147]:39973 "EHLO smtpweb147.aruba.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230047AbhCIMYK (ORCPT ); Tue, 9 Mar 2021 07:24:10 -0500 Received: from [192.168.1.56] ([79.0.204.227]) by Aruba Outgoing Smtp with ESMTPSA id JbP3l6rNA1jmzJbP3l3J2r; Tue, 09 Mar 2021 13:23:58 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aruba.it; s=a1; t=1615292638; bh=TXSSX9JzU1wv9wE+kK9LATPw89208zj66bzBcd5DdXE=; h=Subject:To:From:Date:MIME-Version:Content-Type; b=ijPGQdVn6JaUnCvKIb9/Dhj3aQ4RY2QGRx4Scgm5FBuJ6JDgOY0iz6Ml6LoGk3XM9 tT7TW/QtCRmuZ1dXSriyj7o+dlUk2JEHOH+LsPNRm+tF7lrboCaTRZ5qqHJRo5tjhP M+ZlNQLkoWf40LvTyXf+TbdHXyCTGX+Wrs7tGjEzW8aUOwAdtBdwbuctVI021EMjBZ I+Z6ehAhKVEeOpiTUJBM3a4DzKBxTXwkOEOQL1v/qqiw+KDgCE/TvgjNLX7SSDGIBe dIOcH293w8TeJSW/aOfXjF+S8I7PUC2ZBS1IjjEBt4bvedz7uD45fAOX9xkisglNyi U2YF54GrmKpRw== Subject: Re: [PATCH resend v1 1/7] pps: clients: gpio: Bail out on error when requesting GPIO echo line To: Andy Shevchenko , linux-kernel@vger.kernel.org Cc: Ryan Govostes , Greg Kroah-Hartman References: <20210309112403.36633-1-andriy.shevchenko@linux.intel.com> From: Rodolfo Giometti Message-ID: Date: Tue, 9 Mar 2021 13:23:57 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210309112403.36633-1-andriy.shevchenko@linux.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfC2ATPhzH6vD5AHua1a34RNf/imkge3Hx6JG6nSVAr/PX/CWsZvoubswbog7tv+aND5bLwP+I/c1jEDl4BV8uIK0zd/IttaRnFbJaQcnjQ1z4vpgmgOe Wz02v0Ahckmo1vZ3Ku0/cyqCXlWvX2Ig4cE7KDbZfQ7xdIlfJDIiZKibLlpZVaOX8I08690YbVMx4O7w3IVpS1YLcD7MGGocE04vtLioOtjkBXoPy9y0itgp qGVHs4tFaCJxni8cWo2gD+3bG8HSGaLivB34eW8OevkKnReuf5UbiUwJokP3xakG Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/03/21 12:23, Andy Shevchenko wrote: > 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); > Acked-by: Rodolfo Giometti -- GNU/Linux Solutions e-mail: giometti@enneenne.com Linux Device Driver giometti@linux.it Embedded Systems phone: +39 349 2432127 UNIX programming skype: rodolfo.giometti