From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Ball Subject: Re: FW: Regulator API ignored return values Date: Tue, 12 Mar 2013 10:30:55 -0400 Message-ID: <87y5dsheqo.fsf@octavius.laptop.org> References: <25B60CDC2F704E4E9D88FFD52780CB4C0BDEB0547F@SC-VEXCH1.marvell.com> <201303121403.09315.arnd@arndb.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from void.printf.net ([89.145.121.20]:37096 "EHLO void.printf.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754061Ab3CLObQ (ORCPT ); Tue, 12 Mar 2013 10:31:16 -0400 In-Reply-To: <201303121403.09315.arnd@arndb.de> (Arnd Bergmann's message of "Tue, 12 Mar 2013 14:03:09 +0000") Sender: linux-mmc-owner@vger.kernel.org List-Id: linux-mmc@vger.kernel.org To: Arnd Bergmann Cc: Kevin Liu , "linux-kernel@vger.kernel.org List" , Stephen Warren , linux-arm-kernel@lists.infradead.org, Mark Brown , Linus Walleij , Axel Lin , Jingoo Han , Felipe Balbi , Dmitry Torokhov , linux-mmc@vger.kernel.org Hi, On Tue, Mar 12 2013, Arnd Bergmann wrote: >> Need add regulator_put here since regulator_get has succeed? > > Hmm, we still don't actually bail out if the error is encountered, so > the reference count is balanced with the current patch, but I maybe > a failed regulator_enable() should actually be a fatal error? The reason I didn't make it a fatal error is that this is just vqmmc (responsible for moving from 3.3V to 1.8V for UHS modes), not the main vmmc regulator. We can just disable those UHS modes from the capabilities on the host if vqmmc is missing, or failed to enable, or doesn't support those voltages, and that's what the code does now. Thanks, - Chris. -- Chris Ball One Laptop Per Child