Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6873319ybl; Wed, 15 Jan 2020 11:34:57 -0800 (PST) X-Google-Smtp-Source: APXvYqxmB6pZdPeEvQJO2QBdQs46E1mNSmv9bSEDtRN4nktHMjuS1vPwCO9OclswnVxrvH/qd3PG X-Received: by 2002:aca:dd87:: with SMTP id u129mr1171500oig.14.1579116897486; Wed, 15 Jan 2020 11:34:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579116897; cv=none; d=google.com; s=arc-20160816; b=OEio6a3JmP7lTXqUEFY87do2c8EflFno9dq4USedFLUDFrbircCbcLWyN1bsogjxrw +rWMU+QnwxqxU4zbRh5HROFDS3tEO0Tf1GBbZkknUImnJRJNwsKeeW/X2h3geOkYNxiB y8od2Ty1R6JWWY4Yl6C4uDe600wwAogf8KD/HeTG5p/TlxZJ+QgvTPIaxkVyKhM2CiGO SFPF+kOgXMu1DDHzDvLCkvqyxUJ4ssdkXZMPSuMuM6pEkcxtijjQlE2Q9CXfNLgMF/NE fg+buUQAyPP8YvodfADDtEVPNzbEPnIoYwHktlkLQizR7tdX1wUkIk7LJbZ52ds2Y3al Rddg== 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=/44x+09FuqMV0uOikyTn16u6m7w3ht3ApqEiQ8J1ppk=; b=EXQHts0elYaYpfyTlKCT7ssmLo+74RwgAOns1v/gwMrTA6w+dhQi97nrNHFKXMpUNt b9GtMB+npC1SwdtZebEJcwXko1iVnmX4vvNv57x966cn4uyqrJDi8XV3ci5qW7yXq+M5 jPiG7NuwQaWQaUXcxEfKebm4mdyMyLZd3GVHlHeK93l+GxNIJCw0QlHHSckgJw0hHg3Z evedIjABmwyL+1CrXOA4u//PwUXyVc7y/ZuEMhJY6Ar4+sIaB8qSXaPVrHRjD9ascskc MFvBGh27AmHNQzmiDjX6zMCMZyo7Az+7wsjNRxJz21J/9fd9Nj2Oiu/7R52wyhyx7e/V +qdw== 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 f25si11208647otl.36.2020.01.15.11.34.45; Wed, 15 Jan 2020 11:34:57 -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 S1729332AbgAOTdR (ORCPT + 99 others); Wed, 15 Jan 2020 14:33:17 -0500 Received: from sauhun.de ([88.99.104.3]:40806 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725999AbgAOTdQ (ORCPT ); Wed, 15 Jan 2020 14:33:16 -0500 Received: from localhost (p54B33239.dip0.t-ipconnect.de [84.179.50.57]) by pokefinder.org (Postfix) with ESMTPSA id D51362C0742; Wed, 15 Jan 2020 20:33:14 +0100 (CET) Date: Wed, 15 Jan 2020 20:33:14 +0100 From: Wolfram Sang To: Krzysztof Kozlowski Cc: Linus Walleij , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] i2c: iop3xx: Fix memory leak in probe error path Message-ID: <20200115193314.GA23789@ninjato> References: <20200113172954.5096-1-krzk@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="azLHFNyN32YCQGCU" Content-Disposition: inline In-Reply-To: <20200113172954.5096-1-krzk@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --azLHFNyN32YCQGCU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 13, 2020 at 06:29:54PM +0100, Krzysztof Kozlowski wrote: > When handling devm_gpiod_get_optional() errors, free the memory already > allocated. This fixes Smatch warnings: >=20 > drivers/i2c/busses/i2c-iop3xx.c:437 iop3xx_i2c_probe() warn: possible= memory leak of 'new_adapter' > drivers/i2c/busses/i2c-iop3xx.c:442 iop3xx_i2c_probe() warn: possible= memory leak of 'new_adapter' >=20 > Reported-by: kbuild test robot > Reported-by: Dan Carpenter > Signed-off-by: Krzysztof Kozlowski Applied to for-current, thanks! Please add a 'Fixes' tag next time, added it for you now. --azLHFNyN32YCQGCU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAl4faPIACgkQFA3kzBSg Kbbk2w/+NtYh/9pzq1Cay6U7CbprQKH2/wmfdXJH1ycJteHmo394nhmZh7mvJdrw /6aSQTQzibxn7nzttVDC24EB97K+jgoOeGpS4pcePvMV0WX8feDvDeV6NQOkTAxx 64sbL8nej0ZBKiB6OnxMDkbPq1Su3aQhUWFC1U1COjpGq7VoiEv9TOT/ybtjgr3i Wu4eU786wZhYCJvvs/fdfCMTTxk7EGARLxPXKgw/B2RPWnQyla7egPbkUrfUSebr PbrJPHNGAqzc1+W6dM61TVW97nT6ORe0fHnII4ysX4NfLBYYIyduYuVBGmzkknm/ LhmhTdsMix8XJ0AxLLcMMeX4hKvWmwVrfTymW9wJZL/Kj1HDgwCYLmSLYwwLqyVg JZsGMGpl6/NvttTWXVQ2UbQlBGyL42MXsWRN1JpgzX4iNnl11C5oVagrVJpP1C2n NmofwVqeSk5ufvxyTO8kEduNXPEYPevSeian6eC1FqMT/mjk5MH82AwebpQhLy27 ROP9F/g4yL7ZHT1h+Bi8NuZ3Aj+57r4c3nXUku0bnH6dCWo1QKOdmxPy8x3BymWt +Lskzt2E1OCK/90PWg7CsnRIX06QYs7cVLFNk+xCEwSyJjibJukqFmZu/iD+8qre ejGlqZ/mF1igswHCxNwxM3R71LaXDPkNEY0uBwa0jHULPRpAgwI= =0i7M -----END PGP SIGNATURE----- --azLHFNyN32YCQGCU--