Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758466AbcJQWPe (ORCPT ); Mon, 17 Oct 2016 18:15:34 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:61005 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758319AbcJQWP0 (ORCPT ); Mon, 17 Oct 2016 18:15:26 -0400 From: Arnd Bergmann To: Russell King Cc: Linus Torvalds , linux-kernel@vger.kernel.org, Arnd Bergmann , linux-pcmcia@lists.infradead.org Subject: [PATCH 16/28] pcmcia: fix return value of soc_pcmcia_regulator_set Date: Tue, 18 Oct 2016 00:13:37 +0200 Message-Id: <20161017221355.1861551-4-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20161017220342.1627073-1-arnd@arndb.de> References: <20161017220342.1627073-1-arnd@arndb.de> X-Provags-ID: V03:K0:BhyoVRa+IgulpfYqmEyiRNRsrURuHk2vC/DsxdYiTjCxpPhKLd2 /eNvDvWzh3J5yioXrMmhkyhh9gKYs1c/XPDvxHMJ2pCo2ty9jmrsjQnq5huGv8HeoNq6Wjm 0gw8RxGx7aT7dVfsOwQgIExR/ryPcUJ3ef97Y7AoYj7VQiKZ6RvMf/0loD5G576JOyePTDD fzIkiRhXx81zvVYxRM7Fw== X-UI-Out-Filterresults: notjunk:1;V01:K0:x5rTjMr1NxI=:ORpm9NHwfeKQ15Vu3hVtka /G9rk3iKQ1WR5dAVTlCS1+Q4M1STCfJc/omxg7s6o8xejMKXUo1v4Megiys/ZUhvEkYamSPfS 6/dZ+nXv1QoEMzPySVF76YjQgCEWIr6ClbhofBka3Xct9Bsd51h87Bny9nAdIa29zhOJVwGpd sK3LYi4Q3KInEENqZy69r9boU7zHJiFaGJU62xHG89yhzApFS+HQckh6HiqNy4fMPrJERo/7/ M+kuzqSnuXME1Cp2RLDqS/kJNH4tXq2wZwdrESN1sIAHRfqlHCBTKi1KvkGONiMb5NMfeYMX0 BAgxwjNMOBH+uxYUgqiWUqqhOlDD6Jsrl/nzOGwJSc50eMM/GfFl5qIZlrXBfdp5oCo4mjJXt LCuVP50i8PIOjnOlqYTAMyKPnEEMAzcNed4aTMS8W1WQlSdCqhjShkqeCGKcF6iccUnJoy6Wk OWf9xDTh3/JbMK/Txwzix6En447OpRuDfRr96fSxkK2nqq7snL3ymLoYO5mfh4mnf6hl60wsN bNYtZAa4URFdvZz33WZEIOjjKvrabOWhRsqzfGtDOYKMzwD53UEhNKC22wGtGFKQjhUki1Sfn H5LOZhDHqgfGhy0JN5hceyfoRnHuAOF6jXdR6g/u/1kYvq9ULRhVzvWfMt+tFLtjhme0P54wO FxZhc7uAhi/AaOjFCX37Z5vsQtmMRw8CGM9t1RHPmjXH70EJ2Y1oSt6Ocw56iwcY180k= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1066 Lines: 30 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") Cc: Russell King 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; -- 2.9.0