Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp499512ybz; Fri, 24 Apr 2020 04:17:41 -0700 (PDT) X-Google-Smtp-Source: APiQypKw2nS/rPYZoWsXhxqMsH/WybGOUudu4CZooXXLBONU+rR1lmUSb3aUeEN+hJS2jH4Ovsu6 X-Received: by 2002:a05:6402:1422:: with SMTP id c2mr6848594edx.179.1587727060913; Fri, 24 Apr 2020 04:17:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587727060; cv=none; d=google.com; s=arc-20160816; b=nQ3id932hP8WBtIYr+uTYIN7yIREvYpx+bNjc3/GkGek1867ZWyWKGoJeCsWkJr5hc uVGnh8MWgPb7M6yPQXLVLTu0MehuLt+nR3iXtoY0sEefpldWIvcQdEhvcJde8p3XXscT xEtkvQ+YzJPuI2wcdr+jiFtNBgugwgpJ6jXrGs6aPMYqtAGBPguGu6VEphzihhAgcIBY lxMNQgDlxgLiHAD4xxtYi3mOohcRMRw7KCgUQRJgKymwqudHUnvGeRTZM3PghdDGb9C+ Nog48qY9iWJOhbF9fXDiRrEjmbdo4H1Ephwnopa+AAhrnEmwcyNvaDwLiBWGNcl2izC+ F1Jg== 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=QgAZF/ch296RJd81qmg7+k7sK0a7BbdhsnOMeHLq/CE=; b=xUPpo3yWO1bwgu3ZOegKra8tloWltYmqpDXPAEbD9213Ntx8Ozk2vSlwXqt/EN7Np3 kZCA8SKgs2KhQxIGbiBqRLfurp6hqjanasLABlgQOHwolPtQ3jiS4T7qnK1kU3ccxAXn EEOjkEbL1IStxc70/+85dgTsr1AmfqIyxmvqosKgJ3C2/iGsSi2Hh+HPsYJyEk3+9Ae+ skyrtAo7TUDdVCNDZmFP6s6jIW5Wnrv/Oz51c5flfNt5KAR3bdM3sxSvw5PAz88676BU 7DpMaPDQWoKEfolCpL5pZc5Z01rkvsi/FjqQGb5etNwuy+Y5TC29IGdInCKJScIri9nO Ao5g== ARC-Authentication-Results: i=1; mx.google.com; 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 oh24si2835020ejb.531.2020.04.24.04.17.16; Fri, 24 Apr 2020 04:17:40 -0700 (PDT) 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; 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 S1726899AbgDXLNj (ORCPT + 99 others); Fri, 24 Apr 2020 07:13:39 -0400 Received: from sauhun.de ([88.99.104.3]:46584 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726707AbgDXLNj (ORCPT ); Fri, 24 Apr 2020 07:13:39 -0400 Received: from localhost (p5486CE62.dip0.t-ipconnect.de [84.134.206.98]) by pokefinder.org (Postfix) with ESMTPSA id 7DCDF2C1FE8; Fri, 24 Apr 2020 13:13:37 +0200 (CEST) Date: Fri, 24 Apr 2020 13:13:37 +0200 From: Wolfram Sang To: =?utf-8?B?QmrDtnJuIEFyZMO2?= Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, patrick@stwcx.xyz, kernel@axis.com Subject: Re: [PATCHv2] i2c: slave-eeprom: Make it possible to pre-load eeprom data Message-ID: <20200424111337.GC1959@kunai> References: <20200424090443.26316-1-bjorn.ardo@axis.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+xNpyl7Qekk2NvDX" Content-Disposition: inline In-Reply-To: <20200424090443.26316-1-bjorn.ardo@axis.com> 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 --+xNpyl7Qekk2NvDX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On second look, two questions: > + if (!error) { > + int ret = request_firmware_into_buf(&fw, eeprom_data, &client->dev, > + eeprom->buffer, size); > + if (ret) > + return ret; Aren't we leaking 'fw' here? Also, do we need 'error' and 'ret'? Can't we reuse one of them? > + release_firmware(fw); --+xNpyl7Qekk2NvDX Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAl6iyd0ACgkQFA3kzBSg KbZeTRAAhNyhL+7FSGQup4vRp/jUZk7jAOo4aWGHgKTL6jSYMgvIxtUsY+HwS8FX wqwQpv8xjvc2fiZQTuAnlz7rbMhdK4jGW9GQDjcnWqumJEq20IzN1oF1UNYVl/YR Rp8gA2sH3+Szjd1g1+0snVbgOEy2iMHLhTQYVkQ7RykcmJ7U4FMEJAGKeJqQkLAI 8LVunTx8yih2nbOmFxlNYg0uYoU+TDkPs/qz24kB+zo3/IXIiQxj8htBszgB/89K tymOqNV9vlXHZGh1aZLDDmZCnBtHIXgaRPH1bgOu0vhYRnOxiTCpt4/674Pfb9O6 L+jSugI2tISN/ctDTX5mhLFFsGaAjAYU1fBEqwktZ9w2At0EuC8KnkA9TPORnuV1 N95VZ2b5JLvJBhDQuO6vP3QcQeBkyroHzHijPL8TNjiCqrBLIvMJfvf67Zto+LMr STdmVcOdAG7CVhnUx9qMsn8JJ5ZcFPVd3L5atTsxtBo/lsErGowFOua7zIdIIOVZ xL5tV7awLAAdqNyGTush4Yhib9qF8zGvsWr56T3PA5pnBB+KBgkaRBO67mM9Y0j+ eGF1BEXDT8SsJKgYKQp+aV7Vvx5rtkwfqtNk7qjqYDBFngEamk1LrGm6H++umgEM I6V770O4gOy6wAdSlFKjwgvA1KPDB7TCajbY5wwjnT2dT23I6Fo= =XRl9 -----END PGP SIGNATURE----- --+xNpyl7Qekk2NvDX--