]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: Fix check of unsigned return value and transmit errors in wm831x_gp_ldo_ge...
authorRoel Kluin <roel.kluin@gmail.com>
Fri, 16 Oct 2009 12:16:15 +0000 (14:16 +0200)
committerLiam Girdwood <lrg@slimlogic.co.uk>
Mon, 16 Nov 2009 09:57:17 +0000 (09:57 +0000)
commit98f5133ba1787c6647a9fe67fb6c36c61e5b4348
treea70c837dc27091b54593c2c614e5af7687d01ceb
parent2ac836c5c6a215c4378d1a4211bb993733d6f250
regulator: Fix check of unsigned return value and transmit errors in wm831x_gp_ldo_get_mode()

If ret is unsigned, the checks for negative wm831x_reg_read() return values
are wrong. The error value should be transmitted to its caller, e.g.
wm831x_gp_ldo_get_status() which tests for a negative return value.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
drivers/regulator/wm831x-ldo.c