diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2019-07-22 20:25:57 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-08-13 17:44:30 +0300 |
commit | f0b0710c9f7b8ad6c7a3001f903484746c08bb72 (patch) | |
tree | 3cad27f7d73440d2d511f26a11d6f81d1a6c0860 /drivers | |
parent | 0a6ed11f9884d74ab7333a921dafd35a0de10aac (diff) | |
download | linux-f0b0710c9f7b8ad6c7a3001f903484746c08bb72.tar.xz |
media: dvb-frontends: mn88472: 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')
-rw-r--r-- | drivers/media/dvb-frontends/mn88472.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/dvb-frontends/mn88472.c b/drivers/media/dvb-frontends/mn88472.c index 731b44b9b74c..ef8094aa97df 100644 --- a/drivers/media/dvb-frontends/mn88472.c +++ b/drivers/media/dvb-frontends/mn88472.c @@ -612,9 +612,9 @@ static int mn88472_probe(struct i2c_client *client, * Also, register bank 2 do not support sequential I/O. Only single * register write or read is allowed to that bank. */ - dev->client[1] = i2c_new_dummy(client->adapter, 0x1a); - if (!dev->client[1]) { - ret = -ENODEV; + dev->client[1] = i2c_new_dummy_device(client->adapter, 0x1a); + if (IS_ERR(dev->client[1])) { + ret = PTR_ERR(dev->client[1]); dev_err(&client->dev, "I2C registration failed\n"); if (ret) goto err_regmap_0_regmap_exit; @@ -626,9 +626,9 @@ static int mn88472_probe(struct i2c_client *client, } i2c_set_clientdata(dev->client[1], dev); - dev->client[2] = i2c_new_dummy(client->adapter, 0x1c); - if (!dev->client[2]) { - ret = -ENODEV; + dev->client[2] = i2c_new_dummy_device(client->adapter, 0x1c); + if (IS_ERR(dev->client[2])) { + ret = PTR_ERR(dev->client[2]); dev_err(&client->dev, "2nd I2C registration failed\n"); if (ret) goto err_regmap_1_regmap_exit; |