]> git.baikalelectronics.ru Git - kernel.git/commit
pcmcia: fix return value of soc_pcmcia_regulator_set
authorArnd Bergmann <arnd@arndb.de>
Thu, 10 Nov 2016 16:44:53 +0000 (17:44 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 11 Nov 2016 16:45:08 +0000 (08:45 -0800)
commit069faf0be9abaafd0896b552e9a618a6450c932a
treecbc7f381a610bbf0659a359e98a109e69cb3f605
parentf0e11dbb42e773d50c9234bd813d79b250541f62
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: 16a1106060f6 ("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>
drivers/pcmcia/soc_common.c