From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 11F64C433EF for ; Mon, 7 Feb 2022 14:50:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=5683VhZ9HUjA8KfAiR+7oCeAbAq7rmtZQBo7ADMQf/U=; b=0Q0/6XvJVDa6nMAOg52lnJR5fK 3dEqn479FU/VJ3rQE93CRB6WB/coC+eFgIGD5E3om1zRwFOpgRpTtzWl7Sw494rSZkyesDes4GIoG Jf6GeCHdx1vpOX7dRizpvrho34hdxCrwQ3RwMkkTLEWpoLHVBzhJDJLL03z1R+OummuPzwMb0KDs3 vQ0q4eo12SxXnqHeJtDvxqcaOMT7x5wCa0gJ45s7+vv/y2aAgHTlo9MqQuaG7eR1sqkw+e5Nobzqv kkpTnEemxLneZGp51lWKCwNKEnsgYtB+w8O58gr6IsWm4DUvQ85w4q5g+h6NEjYVvXbBDiTfB3iS1 lXMl+y9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nH5Ir-00AXKL-30; Mon, 07 Feb 2022 14:47:42 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nH5Ij-00AXJR-6d; Mon, 07 Feb 2022 14:47:34 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8F9F36132F; Mon, 7 Feb 2022 14:47:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5927FC004E1; Mon, 7 Feb 2022 14:47:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1644245252; bh=823u3Op3WC/cpHw0jFq2FcbGrRnHMEfr+lxNki6buM4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VtR4Lc2o/2f2O1v+eJk5kB/88OB8coFXuZfqbBDd6ZbxbPM8t/pDkFnqT71Qbz6Cd 6A0Z3AYCW/QWWqGrcrJLRx7O25UDAuWh10K8SvOA9bQiitl58S07ikxj2XB7VuCTdp nBVJp6BHDKzRVPILgzMn8JA9vTmpSE3n/EheNADnXpuXZj4Z5Qb21oSIHfSEhwG+9E 3btfgGN6huk3PLYw07XHo7R1/n8VaKM4Ip9F2jMPZ8BzAh75BvLSDwwTQx2gKyxSwZ QYKpQR9SLtrGeT4MPhlIRqogpf5FueORddYBT7gTm+K6eVUgdHH3f31EPfMVfnlD1d UxrNXBWczu0Kw== Date: Mon, 7 Feb 2022 15:47:28 +0100 From: Wolfram Sang To: Christophe JAILLET Cc: f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com, nsaenz@kernel.org, krzk@kernel.org, stefan.wahren@i2se.com, nh6z@nh6z.net, eric@anholt.net, linux-i2c@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] i2c: bcm2835: Fix the error handling in 'bcm2835_i2c_probe()' Message-ID: Mail-Followup-To: Wolfram Sang , Christophe JAILLET , f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com, nsaenz@kernel.org, krzk@kernel.org, stefan.wahren@i2se.com, nh6z@nh6z.net, eric@anholt.net, linux-i2c@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org References: <338008c444af4785a07fb5a402b60225a4964ae9.1629484876.git.christophe.jaillet@wanadoo.fr> MIME-Version: 1.0 In-Reply-To: <338008c444af4785a07fb5a402b60225a4964ae9.1629484876.git.christophe.jaillet@wanadoo.fr> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220207_064733_363774_7027DE46 X-CRM114-Status: GOOD ( 13.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============9000508420207583855==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============9000508420207583855== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="hummrw8NxFlbNLQO" Content-Disposition: inline --hummrw8NxFlbNLQO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 20, 2021 at 08:43:33PM +0200, Christophe JAILLET wrote: > Some resource should be released if an error occurs in > 'bcm2835_i2c_probe()'. > Add an error handling path and the needed 'clk_disable_unprepare()' and > 'clk_rate_exclusive_put()' calls. >=20 > While at it, rework the bottom of the function to use this newly added > error handling path and have an explicit and more standard "return 0;" at > the end of the normal path. >=20 > Fixes: bebff81fb8b9 ("i2c: bcm2835: Model Divider in CCF") > Signed-off-by: Christophe JAILLET Sadly, noone tested it but I think it is good to avoid the resource leaks. So, rebased and applied to for-next, thanks! Please kindly check if I rebased correctly the irq error case (once I pushed out). --hummrw8NxFlbNLQO Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmIBMPwACgkQFA3kzBSg KbZFKhAAi5cesS0ucf8ZPQrs1eGglGGzCUhyOm3t8uff8TDyHkmFfRSu9xG2Dwh9 ie1QiIKrf+qHPLVIsd9DXn+vYbOs/oF4B4uLEJ37RCbADAIX90YwY8x9w+txWBtv 5Jj3RRtqrFafNBS8ml2efRbiftcNT8ii9K3yxw3p3a4RNaFBPUkw0ccAcna6kHhk v0rHg4JxjilGg92qO1QWdJZ1y419qGxHtOL3kCUx9M+CTgGkTEivkqnCoHkjz7z9 piN3FvfZ2ZrfuzVC65iU5YseCpaPiKwWcKVeaKPAvVvEpa4LCzfgn/Jo/T9kCnzc mRO+dwpJO0xPVYcQhHVz4HM5m0MVNywFpxnvLMygSxq4LXQYzUAv/v1I6qkfUrAi S7eJ5bkE0ngrEZgrdTGZW+O8FaJmek3KqDVmYcOZRPfzUH6Qcw6qYtEe1JepOTd0 FYgsjz5C2oi5IzRHg2RSFreyoIRf2DqD4YxUkvMXFFkMfA/P1RRKOKJ9eHv1Q8L+ ItFxhffLAA5BaKXE/ZxOdOKVFhfWY8xhb/phE9XmHzTlX1vPMI+e33eJRp9dz26b qWuYmUkEnhm1U+BvUt9gQLSQa9eRH0Nce6E8/4rmQJGQDFSX61NHIUtGAbWe6pm+ zL+nxrjRIh7EPUTqs/7QlXCHfZZfGUbn0NTrtZXZes5cdOYsn2g= =UMF4 -----END PGP SIGNATURE----- --hummrw8NxFlbNLQO-- --===============9000508420207583855== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============9000508420207583855==--