diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2019-07-22 14:25:55 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-08-13 11:43:33 -0300 |
commit | 0a248872e4c50dddcf502dd850037e52016f6d53 (patch) | |
tree | 8e9d9cbec853d2218adbda1354ae9efa566d54f2 /drivers/media/dvb-frontends/cxd2820r_core.c | |
parent | 864919ea0380e62adb2503b89825fe358acb8216 (diff) |
media: dvb-frontends: cxd2820r_core: convert to i2c_new_dummy_device
Move from i2c_new_dummy() to i2c_new_dummy_device(), so we now get an
ERRPTR which we use in error handling.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/dvb-frontends/cxd2820r_core.c')
-rw-r--r-- | drivers/media/dvb-frontends/cxd2820r_core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/dvb-frontends/cxd2820r_core.c b/drivers/media/dvb-frontends/cxd2820r_core.c index 1f006f8e8cc2..5280ba4085e4 100644 --- a/drivers/media/dvb-frontends/cxd2820r_core.c +++ b/drivers/media/dvb-frontends/cxd2820r_core.c @@ -632,9 +632,9 @@ static int cxd2820r_probe(struct i2c_client *client, * one dummy I2C client in in order to get own I2C client for each * register bank. */ - priv->client[1] = i2c_new_dummy(client->adapter, client->addr | (1 << 1)); - if (!priv->client[1]) { - ret = -ENODEV; + priv->client[1] = i2c_new_dummy_device(client->adapter, client->addr | (1 << 1)); + if (IS_ERR(priv->client[1])) { + ret = PTR_ERR(priv->client[1]); dev_err(&client->dev, "I2C registration failed\n"); if (ret) goto err_regmap_0_regmap_exit; |