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

media: i2c: ad9389b: 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>

authored by

Wolfram Sang and committed by
Mauro Carvalho Chehab
b13d326e 4cdd5156

+3 -3
+3 -3
drivers/media/i2c/ad9389b.c
··· 1148 1148 v4l2_dbg(1, debug, sd, "reg 0x41 0x%x, chip version (reg 0x00) 0x%x\n", 1149 1149 ad9389b_rd(sd, 0x41), state->chip_revision); 1150 1150 1151 - state->edid_i2c_client = i2c_new_dummy(client->adapter, (0x7e>>1)); 1152 - if (state->edid_i2c_client == NULL) { 1151 + state->edid_i2c_client = i2c_new_dummy_device(client->adapter, (0x7e >> 1)); 1152 + if (IS_ERR(state->edid_i2c_client)) { 1153 1153 v4l2_err(sd, "failed to register edid i2c client\n"); 1154 - err = -ENOMEM; 1154 + err = PTR_ERR(state->edid_i2c_client); 1155 1155 goto err_entity; 1156 1156 } 1157 1157