Commit e61f9ea2 authored by Wei Yongjun's avatar Wei Yongjun Committed by Mauro Carvalho Chehab

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: e6089fec ("media: m88ds3103: Add support for ds3103b demod")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent b9302fa7
...@@ -1904,8 +1904,8 @@ static int m88ds3103_probe(struct i2c_client *client, ...@@ -1904,8 +1904,8 @@ static int m88ds3103_probe(struct i2c_client *client,
dev->dt_client = i2c_new_dummy_device(client->adapter, dev->dt_client = i2c_new_dummy_device(client->adapter,
dev->dt_addr); dev->dt_addr);
if (!dev->dt_client) { if (IS_ERR(dev->dt_client)) {
ret = -ENODEV; ret = PTR_ERR(dev->dt_client);
goto err_kfree; goto err_kfree;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment