From patchwork Thu Nov 10 16:44:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9421479 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 55FEE60512 for ; Thu, 10 Nov 2016 16:46:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5273329767 for ; Thu, 10 Nov 2016 16:46:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 451CD2976C; Thu, 10 Nov 2016 16:46:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D108D29767 for ; Thu, 10 Nov 2016 16:46:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935076AbcKJQql (ORCPT ); Thu, 10 Nov 2016 11:46:41 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:54772 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935010AbcKJQqj (ORCPT ); Thu, 10 Nov 2016 11:46:39 -0500 Received: from wuerfel.lan ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue002 [212.227.15.129]) with ESMTPA (Nemesis) id 0Lst7y-1cpX6p48C2-012U3x; Thu, 10 Nov 2016 17:45:46 +0100 From: Arnd Bergmann To: Linus Torvalds Cc: Andrew Morton , Arnd Bergmann , Anna Schumaker , "David S. Miller" , Herbert Xu , Ilya Dryomov , Javier Martinez Canillas , Jiri Kosina , Jonathan Cameron , Ley Foon Tan , "Luis R . Rodriguez" , Martin Schwidefsky , Mauro Carvalho Chehab , Michal Marek , Russell King , Sean Young , Sebastian Ott , Trond Myklebust , x86@kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-snps-arc@lists.infradead.org, nios2-dev@lists.rocketboards.org, linux-s390@vger.kernel.org, linux-crypto@vger.kernel.org, linux-media@vger.kernel.org, linux-nfs@vger.kernel.org Subject: [PATCH v2 10/11] pcmcia: fix return value of soc_pcmcia_regulator_set Date: Thu, 10 Nov 2016 17:44:53 +0100 Message-Id: <20161110164454.293477-11-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20161110164454.293477-1-arnd@arndb.de> References: <20161110164454.293477-1-arnd@arndb.de> X-Provags-ID: V03:K0:t95QodDqhnfoa2pCBD/pm7c0QOd9qacrB1eGB5hVoRZl1Ir4NeE Aq54UHjtB+Vh4N9Pxx7gJPQvXPGs5bVzciMnPkO2JgeMMcTII+n/ucigD3jURJBGW8iIbB/ AjAH1tveDxAwOtTmwdDemh5aJ8kXrpvtigp6O6pUS2Nh7kzRlivD4TEIFgZ/8JZ9bUzDSCR WeGR/fCUnQfJQOSJR+ZoA== X-UI-Out-Filterresults: notjunk:1; V01:K0:Gv6vu2smxh8=:Wj+z5+FGCKOy4KfjzYzUcC S5ljuBh3SicWU4jP5+uspQR8KH7YY+chpC6ZWI2umywYjnPjuQBIx4juFPYUGExYnWy6eaGd+ FrZjEUnFUXf9ycZWUNLu616gbWZrda+dOvxggdZivMzTtaBk3r37rWlDkAxMqV8JJoedsAMZN DY4+1L75PuF4keBiVI10kVejgMRuGc1t65WBuLIis0jjoQSijYiNNb+O35jIYu/isHOR6wB8L SfPUNhYQ+iJ7+7wsdRx9a3HrvekV1lReJu8eyvCN3DCjhfewoHv9u6Uh67GRCZK/n/Dg5ugD0 GqcxjVPcnJdAbq6k9Oe1aZGJFK+AbqdKzuC0AQMY//qNeb5if+UPqSMRBW1TtzO8Gei6A6o1F 0VPxtS28LhJO+lt2WizDCuicXH3S5PRdpDelfmLjTv+K96ZazOsLgFSNLfaP85VdBbXdDoSDz 78JMsUyWAPuX4kQVXSpI+JI4cpP1cqziB/oSbwjloWB2RlMVQD9AdApCHGg/KRYI39xTzEWI+ fJ8uvXifzray9l25MzVwyeHLa+AxBAmoyuDWHAXj/JI83unCt06UJfu8jqPd+Q2mRdobD4EWF FiU6ZZcYARj79AFqS7DnindhYuUWSaJYuNZIy+7I4z37AGmUCK1+jaXkHjxOpwPFJehGdo4V4 Ts9sMrOaNnXlwXn69zczsMYewB6/uhhoMnGQ0Ts52kxVKpPcoOUmxUBfmtrJKUvI+IG4= Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The newly introduced soc_pcmcia_regulator_set() function sometimes returns without setting its return code, as shown by this warning: drivers/pcmcia/soc_common.c: In function 'soc_pcmcia_regulator_set': drivers/pcmcia/soc_common.c:112:5: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized] This changes it to propagate the regulator_disable() result instead. Fixes: ac61b6001a63 ("pcmcia: soc_common: add support for Vcc and Vpp regulators") Signed-off-by: Arnd Bergmann --- drivers/pcmcia/soc_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c index 153f312..b6b316d 100644 --- a/drivers/pcmcia/soc_common.c +++ b/drivers/pcmcia/soc_common.c @@ -107,7 +107,7 @@ int soc_pcmcia_regulator_set(struct soc_pcmcia_socket *skt, ret = regulator_enable(r->reg); } else { - regulator_disable(r->reg); + ret = regulator_disable(r->reg); } if (ret == 0) r->on = on;