]> git.baikalelectronics.ru Git - kernel.git/commit
power: supply: mt6370: Fix return value check in mt6370_chg_probe()
authorYang Yingliang <yangyingliang@huawei.com>
Wed, 21 Sep 2022 15:29:15 +0000 (23:29 +0800)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Sat, 1 Oct 2022 20:17:45 +0000 (22:17 +0200)
commit06826a1e5821e005f3ff667fb9016681f89e9e9b
tree9ef810cfe83ce564e401e511d1d827566f8872ab
parentf949f998da20cd0cb701725ee82426cf95474a7a
power: supply: mt6370: Fix return value check in mt6370_chg_probe()

If create_singlethread_workqueue() fails, it returns a null pointer,
replace IS_ERR() check with NULL pointer check.

Fixes: fbc9117ee813 ("power: supply: mt6370: Add MediaTek MT6370 charger driver")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: ChiaEn Wu <chiaen_wu@richtek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/mt6370-charger.c