2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-25 15:15:33 +08:00

media: m88ds3103: fix return value check in m88ds3103_probe()

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

Fixes: e6089feca4 ("media: m88ds3103: Add support for ds3103b demod")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
Wei Yongjun 2021-03-08 13:28:02 +01:00 committed by Mauro Carvalho Chehab
parent b9302fa7ed
commit e61f9ea271

View File

@ -1904,8 +1904,8 @@ static int m88ds3103_probe(struct i2c_client *client,
dev->dt_client = i2c_new_dummy_device(client->adapter,
dev->dt_addr);
if (!dev->dt_client) {
ret = -ENODEV;
if (IS_ERR(dev->dt_client)) {
ret = PTR_ERR(dev->dt_client);
goto err_kfree;
}
}