]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
mfd: ab8500-core: Return zero in get_register_interruptible()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 25 Oct 2018 12:43:44 +0000 (15:43 +0300)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commitf4a18040a04e4ddc2a8f2aa85f41a773368d4ee1
treec1528465fb6d4fe047d90aab7e9f9a6cdd80a7e5
parent1f0dd26a593ef5be43329eba25e4f3a8014601ff
mfd: ab8500-core: Return zero in get_register_interruptible()

BugLink: https://bugs.launchpad.net/bugs/1837813
[ Upstream commit 10628e3ecf544fa2e4e24f8e112d95c37884dc98 ]

This function is supposed to return zero on success or negative error
codes on error.  Unfortunately, there is a bug so it sometimes returns
non-zero, positive numbers on success.

I noticed this bug during review and I can't test it.  It does appear
that the return is sometimes propogated back to _regmap_read() where all
non-zero returns are treated as failure so this may affect run time.

Fixes: 47c1697508f2 ("mfd: Align ab8500 with the abx500 interface")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/mfd/ab8500-core.c