Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Wolfram Sang and committed by
Lee Jones
ba972dac ad9fc1f4

+3 -3
+3 -3
drivers/mfd/twl-core.c
··· 1141 1141 if (i == 0) { 1142 1142 twl->client = client; 1143 1143 } else { 1144 - twl->client = i2c_new_dummy(client->adapter, 1144 + twl->client = i2c_new_dummy_device(client->adapter, 1145 1145 client->addr + i); 1146 - if (!twl->client) { 1146 + if (IS_ERR(twl->client)) { 1147 1147 dev_err(&client->dev, 1148 1148 "can't attach client %d\n", i); 1149 - status = -ENOMEM; 1149 + status = PTR_ERR(twl->client); 1150 1150 goto fail; 1151 1151 } 1152 1152 }