From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965042AbcBCRUl (ORCPT ); Wed, 3 Feb 2016 12:20:41 -0500 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:33533 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932779AbcBCRUj (ORCPT ); Wed, 3 Feb 2016 12:20:39 -0500 Date: Wed, 3 Feb 2016 17:20:29 +0000 From: Mark Brown To: Harald Geyer Cc: Liam Girdwood , Heiko Stuebner , linux-kernel@vger.kernel.org Message-ID: <20160203172029.GI4455@sirena.org.uk> References: <1454010918-29369-1-git-send-email-harald@ccbib.org> <1454010918-29369-2-git-send-email-harald@ccbib.org> <20160128230906.GC4130@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="x7gJcYyRf5ZnuMVj" Content-Disposition: inline In-Reply-To: X-Cookie: Duckies are fun! User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: 2a01:348:6:8808:fab::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH 1/2] regulator: gpio: Avoid unnecessarily copying data structures in probe() X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --x7gJcYyRf5ZnuMVj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jan 29, 2016 at 05:25:28PM +0100, Harald Geyer wrote: > Mark Brown writes: > > On Thu, Jan 28, 2016 at 07:55:17PM +0000, Harald Geyer wrote: > > > The data structures either have been copied in > > > of_get_gpio_regulator_config() already or are part of platform data, > > > which we keep a pointer to for the life time of the device anyway. > > The point of this code is to avoid referring to platform data after > > probe for robustness. > Well, if we can't rely on platform data staying available after probe() > then probably we shouldn't keep a pointer to it - but thats a different > issue, so lets focus on the original problem: > What's your preferred way to fix the error path of probe() then? Add the matching frees? I'm not sure I know what the original problem is mind you. --x7gJcYyRf5ZnuMVj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWsjbdAAoJECTWi3JdVIfQaJUH/Ri59hHPZnGNNR6bxD86h3RH UcYJdD0qRtuHR0Gw2QxMv+9Q4t7CCNLKO0+nsQQNOLGcKQ7vwqfKjh2dVhyic9/o Lp9qw8VnngDjLMf7x2qt++VQI/sLN1FXII1Sg+zk2EspHKsNSPcEiTheFU/00LRx AzFd9qCbbSFX2qr8pg2BO9PTrI97I76scG2ucw+JKxe8/6eC5Gxt0UmEPXa6YK3u j9VtKPHxlqRb9tH3ZsXMh0+0hE9BYEIi5DkXUEG7GwbUHFvutsqHc61VOjSR6Y3l BkPqabo3xXj7CzOYc7MYvDfB6A/RE1rzuwzHOSjIqGLL1eGxfE4I08bO948e77A= =htwh -----END PGP SIGNATURE----- --x7gJcYyRf5ZnuMVj--