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)
commit5738d49fa47e0046050f5e62e4921d667b7ee3c3
tree9ef810cfe83ce564e401e511d1d827566f8872ab
parentfe259a2155b43dff59be1e1e3c59ac72cfeab630
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: 233cb8a47d65 ("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