usb: typec: anx7411: Fix return value check in anx7411_register_i2c_dummy_clients()
authorYang Yingliang <yangyingliang@huawei.com>
Thu, 21 Jul 2022 07:12:00 +0000 (15:12 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Jul 2022 12:27:53 +0000 (14:27 +0200)
commit5cda657679f8fcb2896e4ac0aa8e231f12f9fb04
treec01857d70480be01d0c40de8477648ce0b0e1cfc
parent67fb0cc02f89049e532b008faa35818c82aa0d62
usb: typec: anx7411: Fix return value check in anx7411_register_i2c_dummy_clients()

If i2c_new_dummy_device() fails, it never return NULL pointer, replace
NULL test with IS_ERR() to fix it.

Fixes: fe6d8a9c8e64 ("usb: typec: anx7411: Add Analogix PD ANX7411 support")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220721071201.269344-2-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/anx7411.c