Commit ba972dac authored by Wolfram Sang's avatar Wolfram Sang Committed by Lee Jones
Browse files

mfd: twl-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: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent ad9fc1f4
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1141,12 +1141,12 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id)
		if (i == 0) {
			twl->client = client;
		} else {
			twl->client = i2c_new_dummy(client->adapter,
			twl->client = i2c_new_dummy_device(client->adapter,
						    client->addr + i);
			if (!twl->client) {
			if (IS_ERR(twl->client)) {
				dev_err(&client->dev,
					"can't attach client %d\n", i);
				status = -ENOMEM;
				status = PTR_ERR(twl->client);
				goto fail;
			}
		}