Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753266Ab2JIGeO (ORCPT ); Tue, 9 Oct 2012 02:34:14 -0400 Received: from opensource.wolfsonmicro.com ([80.75.67.52]:38092 "EHLO opensource.wolfsonmicro.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751440Ab2JIGeL (ORCPT ); Tue, 9 Oct 2012 02:34:11 -0400 Date: Tue, 9 Oct 2012 15:33:53 +0900 From: Mark Brown To: Andrey Smirnov Cc: andrey.smrinov@convergeddevices.net, hverkuil@xs4all.nl, mchehab@redhat.com, sameo@linux.intel.com, perex@perex.cz, tiwai@suse.de, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/6] Add the main bulk of core driver for SI476x code Message-ID: <20121009063349.GN8237@opensource.wolfsonmicro.com> References: <1349488502-11293-1-git-send-email-andrey.smirnov@convergeddevices.net> <1349488502-11293-3-git-send-email-andrey.smirnov@convergeddevices.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1349488502-11293-3-git-send-email-andrey.smirnov@convergeddevices.net> X-Cookie: Your present plans will be successful. User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 996 Lines: 28 On Fri, Oct 05, 2012 at 06:54:58PM -0700, Andrey Smirnov wrote: > + err = regulator_enable(core->supplies.va); > + if (err < 0) > + break; > + > + err = regulator_enable(core->supplies.vio2); > + if (err < 0) > + goto disable_va; > + > + err = regulator_enable(core->supplies.vd); > + if (err < 0) > + goto disable_vio2; > + > + err = regulator_enable(core->supplies.vio1); > + if (err < 0) > + goto disable_vd; If the sequencing is critical here you should have comments explaining what the requirement is, otherwise this looks like a prime candidate for conversion to regulator_bulk_enable() (and similarly for all the other regulator usage, it appears that all the regulators are worked with in a bulk fashion). -- 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/