diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-11-10 17:44:53 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-11-11 17:45:08 +0100 |
commit | 75ed26878b4cc0ca1c9d8ed5a642b45b60c231d9 (patch) | |
tree | cbc7f381a610bbf0659a359e98a109e69cb3f605 /drivers/pcmcia/soc_common.c | |
parent | infiniband: shut up a maybe-uninitialized warning (diff) | |
download | linux-75ed26878b4cc0ca1c9d8ed5a642b45b60c231d9.tar.xz linux-75ed26878b4cc0ca1c9d8ed5a642b45b60c231d9.zip |
pcmcia: fix return value of soc_pcmcia_regulator_set
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 <arnd@arndb.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/pcmcia/soc_common.c')
-rw-r--r-- | drivers/pcmcia/soc_common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c index 153f3122283d..b6b316de055c 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; |