Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9647642imu; Sun, 30 Dec 2018 01:53:34 -0800 (PST) X-Google-Smtp-Source: ALg8bN4vHtba+9mzlI8K7vKo3AVxgagfvQdgNjcNo/FuO3Ry8G40aF8mAeD4/IpYLY4DJ9eu6taS X-Received: by 2002:a63:790e:: with SMTP id u14mr4065660pgc.452.1546163614229; Sun, 30 Dec 2018 01:53:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546163614; cv=none; d=google.com; s=arc-20160816; b=NMPNz4I9T8ampgTKnq5g0hQ+dL6hOfS2KpyE1U9KA+ej8Jf+M+/sVzRMY2RK8jTe5u 9mp63HaqbVgsZ2Yg2qXJFJWukUcDlTU1zcwfC8hv/FGMCZkl02YOteeaq+oFo+1RUG1E LiXV6n/FBW2zJ/hCCxiAdjQ1rVMYB59JUr48x6cZyorXDB0teYPY5sQPtZthkSdkXVKA CrrpEueBh/mMd1hULI1Hu0PlRJJIOR3Dhfb/754HLVFPt6nOaydi3Jvqpc1rX8I4uK4+ AH8NfP21OKSUEZca3YApZ4fzW8aGsS6k93u6dj4BT8NoLKPq4MY5eRQDsjQynTQ5kh5o iZSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=rhZnf1/XYoAbntNSnDot5LkNy1FStXI7TdvbAf3SN7Q=; b=PTMjxQljDXq59kHsaReuk1cX3VJ5uGY3Ckq30RyxQqnOn1XJxcFxAoodyq+jEnjbL8 niT43BA/EVAxLOqVdYzVyfMiYVeU38rq8SeY6fkXB47/xhQO1sxHnAEybMyGxchE11MF 64zeQm3WdVSFaTx3G2bK87S3cAlCILEAWxcrT9GACiovZ22kOhqf1+mG3Smk/qk3QRaL JpjCAjTXV1Qltem0swJFWEX/ObLG9kshDyt8ePTfp473p+gsfAbnQeRZi74ZAw8y63v9 6nbHIRW0NZVWcsg7IHG3Gfgc0Rb1Z3TbBoj+97zq0rO+LqEhnUh8Vxl34eBzAK28cLTl yZtg== 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 q14si42486014pgg.433.2018.12.30.01.53.18; Sun, 30 Dec 2018 01:53:34 -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 S1726144AbeL3Jwa (ORCPT + 99 others); Sun, 30 Dec 2018 04:52:30 -0500 Received: from mslow2.mail.gandi.net ([217.70.178.242]:56082 "EHLO mslow2.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726038AbeL3Jwa (ORCPT ); Sun, 30 Dec 2018 04:52:30 -0500 Received: from relay7-d.mail.gandi.net (unknown [217.70.183.200]) by mslow2.mail.gandi.net (Postfix) with ESMTP id CC4AB3A441C; Sun, 30 Dec 2018 10:49:33 +0100 (CET) X-Originating-IP: 37.176.180.32 Received: from uno.localdomain (unknown [37.176.180.32]) (Authenticated sender: jacopo@jmondi.org) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 55C5720003; Sun, 30 Dec 2018 09:49:29 +0000 (UTC) Date: Sun, 30 Dec 2018 10:49:27 +0100 From: Jacopo Mondi To: Alexey Khoroshilov Cc: Mauro Carvalho Chehab , Jacopo Mondi , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, ldv-project@linuxtesting.org Subject: Re: [PATCH] media: tw9910: add missed clk_disable_unprepare() on failure path Message-ID: <20181230094918.6ysahn7tr6us6uoh@uno.localdomain> References: <1546119320-11841-1-git-send-email-khoroshilov@ispras.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="csa27tseyhrjxlu6" Content-Disposition: inline In-Reply-To: <1546119320-11841-1-git-send-email-khoroshilov@ispras.ru> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --csa27tseyhrjxlu6 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Hi Alexey, thanks for the patch On Sun, Dec 30, 2018 at 12:35:20AM +0300, Alexey Khoroshilov wrote: > If gpiod_get_optional() fails in tw9910_power_on(), clk is left undisabled. > Correct, thanks for spotting this. I think pdn_gpio should also be handled if rstb_gpio fails. What's your opinion? Thanks j > Found by Linux Driver Verification project (linuxtesting.org). > > Signed-off-by: Alexey Khoroshilov > --- > drivers/media/i2c/tw9910.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/media/i2c/tw9910.c b/drivers/media/i2c/tw9910.c > index a54548cc4285..109770d678d2 100644 > --- a/drivers/media/i2c/tw9910.c > +++ b/drivers/media/i2c/tw9910.c > @@ -610,6 +610,7 @@ static int tw9910_power_on(struct tw9910_priv *priv) > GPIOD_OUT_LOW); > if (IS_ERR(priv->rstb_gpio)) { > dev_info(&client->dev, "Unable to get GPIO \"rstb\""); > + clk_disable_unprepare(priv->clk); > return PTR_ERR(priv->rstb_gpio); > } > > -- > 2.7.4 > --csa27tseyhrjxlu6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEtcQ9SICaIIqPWDjAcjQGjxahVjwFAlwolKcACgkQcjQGjxah VjyYNhAArW3S6a0VKHt1tOqepKIhIZkqkl9SIlfKx0RuP2ir7rN9CQllhhwnqeyH p+7qzScVydDnk+tmTqXEqf3w0yFpgtCc3qqMjyYNkfBWtbb2O0YQCpcq4hDzHyHK jeEinxZzUzn5T9eBwMpjEI9wFi+3fjUit4yRSN7O9kdfQRCpYjCHdQEVuqUwuf5w 8OrlMV6VhV3MARQdvbh4JAQ4ldQoUkx7cVRZ7rkL73qRb8pGTuIZAJbHO0A9mZKd mkc6yjOga9VIBmx54MHHzRBNtMZjtqth05GOvp6oTZ1zMMZ9iGCR93x5f5+rM6+I C1ep5Ju0KP4MGqzzfsmal2Cfp9Wq6HD0O+D1y3okwkV7YfZ63Fxz4PS3vDecS37J qBD9eC4TsYBo/WPCCX/Xe0WfTeonpbDD8dMkTSoZ9kbwbbl8F5hzBj4mKOEFcrPc c20Rea4WMWayE7WHmEKkHiEOwsrAdkGSBMxEmzb7rD48rCv5rXPISbTQXESKRFsM c6egrbU2Blgl0pnh9RJjygjnpgARzPyLiPuy+CtAs8vH3Qd8+LHGadxkvqZ+1y6U EZYkdF56iYTKq6SJDf5/OFJnKZi9++5dYrbgH7iZR19IPF1ZJblOgdmNKHeZQgRY 0UM3MbsiTNH421Uipf8Qf5AjS5G9MB5EQsCICYMBJ/HAP8XzZNE= =xxg+ -----END PGP SIGNATURE----- --csa27tseyhrjxlu6--