Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753456Ab3DKGoX (ORCPT ); Thu, 11 Apr 2013 02:44:23 -0400 Received: from eu1sys200aog118.obsmtp.com ([207.126.144.145]:58863 "EHLO eu1sys200aog118.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753083Ab3DKGoW (ORCPT ); Thu, 11 Apr 2013 02:44:22 -0400 Message-ID: <51665BB9.6030101@stericsson.com> Date: Thu, 11 Apr 2013 08:44:09 +0200 From: =?UTF-8?B?QmVuZ3QgSsO2bnNzb24=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Axel Lin Cc: Mark Brown , Lee Jones , Yvan FILLION , Liam Girdwood , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 2/2] regulator: ab8500: Unregister ab8500-ext regulators in probe() failure path References: <1365653058.17060.0.camel@phoenix> <1365653143.17060.2.camel@phoenix> In-Reply-To: <1365653143.17060.2.camel@phoenix> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1078 Lines: 32 On 04/11/2013 06:05 AM, Axel Lin wrote: > Signed-off-by: Axel Lin Looks good to me. Acked-by: Bengt Jonsson > --- > drivers/regulator/ab8500.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c > index c200f8b..ea182d3 100644 > --- a/drivers/regulator/ab8500.c > +++ b/drivers/regulator/ab8500.c > @@ -3172,8 +3172,11 @@ static int ab8500_regulator_probe(struct platform_device *pdev) > for (i = 0; i < abx500_regulator.info_size; i++) { > err = ab8500_regulator_register(pdev, &pdata->regulator[i], > i, NULL); > - if (err < 0) > + if (err < 0) { > + if (!is_ab8505(ab8500)) > + ab8500_ext_regulator_exit(pdev); > return err; > + } > } > > return 0; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/