summaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard/cap11xx.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2016-02-11 11:17:03 +0100
committerMark Brown <broonie@kernel.org>2016-02-19 17:02:34 +0100
commit4434cee9b6e9d70c8afea0d46bb211f132039d19 (patch)
tree16f464d0cbde8b84a4d78944f53f8604329dac04 /drivers/input/keyboard/cap11xx.c
parentLinux 4.5-rc1 (diff)
downloadlinux-4434cee9b6e9d70c8afea0d46bb211f132039d19.tar.xz
linux-4434cee9b6e9d70c8afea0d46bb211f132039d19.zip
regulator: ad5398: Fix return value of ad5398_write_reg
i2c_master_send() returns the number of bytes written on success. So current code returns 2 if ad5398_write_reg() success. This return value is propagated to .set_current_limit, .enable and .disable callbacks of regulator_ops. This can be a problem, for example, if the users test if the return value of regulator_set_current_limit() is 0. Fix it by making ad5398_write_reg() return 0 on success. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/input/keyboard/cap11xx.c')
0 files changed, 0 insertions, 0 deletions