From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751860AbdBOQxC (ORCPT ); Wed, 15 Feb 2017 11:53:02 -0500 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:39425 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751299AbdBOQxB (ORCPT ); Wed, 15 Feb 2017 11:53:01 -0500 Message-ID: <1487177576.2433.45.camel@pengutronix.de> Subject: Re: [PATCH 10/14] phy: meson8b-usb2: simplify optional reset handling From: Philipp Zabel To: Jerome Brunet Cc: Martin Blumenstingl , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Ramiro Oliveira , Kevin Hilman , Carlo Caione , Kishon Vijay Abraham I Date: Wed, 15 Feb 2017 17:52:56 +0100 In-Reply-To: <1487177007.30202.1.camel@baylibre.com> References: <20170130114116.22089-1-p.zabel@pengutronix.de> <20170130114116.22089-10-p.zabel@pengutronix.de> <1487177007.30202.1.camel@baylibre.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.9-1+b1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:100:3ad5:47ff:feaf:1a17 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jerome, On Wed, 2017-02-15 at 17:43 +0100, Jerome Brunet wrote: [...] > > > @@ -241,7 +239,7 @@ static int phy_meson8b_usb2_probe(struct > > > platform_device *pdev) > > > return PTR_ERR(priv->clk_usb); > > > > > > priv->reset = devm_reset_control_get_optional_shared(&pdev- > > > >dev, NULL); > > > - if (PTR_ERR(priv->reset) == -EPROBE_DEFER) > > > + if (PTR_ERR(priv->reset)) > > This is wrong and will always exit on error. It should be "IS_ERR". > Clearly the bug was there before your patch, but since you are changing > the faulty line, would you mind using IS_ERR instead ? > > With this changed: > Tested-by: Jerome Brunet Thanks for catching this, I should have changed this to IS_ERR when removing the error value comparison. regards Philipp From mboxrd@z Thu Jan 1 00:00:00 1970 From: p.zabel@pengutronix.de (Philipp Zabel) Date: Wed, 15 Feb 2017 17:52:56 +0100 Subject: [PATCH 10/14] phy: meson8b-usb2: simplify optional reset handling In-Reply-To: <1487177007.30202.1.camel@baylibre.com> References: <20170130114116.22089-1-p.zabel@pengutronix.de> <20170130114116.22089-10-p.zabel@pengutronix.de> <1487177007.30202.1.camel@baylibre.com> Message-ID: <1487177576.2433.45.camel@pengutronix.de> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Jerome, On Wed, 2017-02-15 at 17:43 +0100, Jerome Brunet wrote: [...] > > > @@ -241,7 +239,7 @@ static int phy_meson8b_usb2_probe(struct > > > platform_device *pdev) > > > return PTR_ERR(priv->clk_usb); > > > > > > priv->reset = devm_reset_control_get_optional_shared(&pdev- > > > >dev, NULL); > > > - if (PTR_ERR(priv->reset) == -EPROBE_DEFER) > > > + if (PTR_ERR(priv->reset)) > > This is wrong and will always exit on error. It should be "IS_ERR". > Clearly the bug was there before your patch, but since you are changing > the faulty line, would you mind using IS_ERR instead ? > > With this changed: > Tested-by: Jerome Brunet Thanks for catching this, I should have changed this to IS_ERR when removing the error value comparison. regards Philipp