]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: rt4831: Fix return value check in rt4831_regulator_probe()
authorWei Yongjun <weiyongjun1@huawei.com>
Fri, 5 Mar 2021 03:49:30 +0000 (03:49 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 10 Mar 2021 12:22:27 +0000 (12:22 +0000)
commita8d0f9607b151cfa0ceb38e0eefe30f530c85c18
tree22398fd3e1db3b2c72253a1c2bbf1cc315d2f6c4
parentc8e2fb6bfcfc1780602148c5ac7af50f41e84c03
regulator: rt4831: Fix return value check in rt4831_regulator_probe()

In case of error, the function dev_get_regmap() returns NULL
pointer not ERR_PTR(). The IS_ERR() test in the return value
check should be replaced with NULL test.

Fixes: 0abff44bafdf ("regulator: rt4831: Adds support for Richtek RT4831 DSV regulator")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20210305034930.3236099-1-weiyongjun1@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/rt4831-regulator.c