Commit 31b9754c authored by Wolfram Sang's avatar Wolfram Sang Committed by Mauro Carvalho Chehab
Browse files

media: i2c: adv7180: 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 avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent b13d326e
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -1329,17 +1329,17 @@ static int adv7180_probe(struct i2c_client *client,
	}

	if (state->chip_info->flags & ADV7180_FLAG_MIPI_CSI2) {
		state->csi_client = i2c_new_dummy(client->adapter,
		state->csi_client = i2c_new_dummy_device(client->adapter,
				ADV7180_DEFAULT_CSI_I2C_ADDR);
		if (!state->csi_client)
			return -ENOMEM;
		if (IS_ERR(state->csi_client))
			return PTR_ERR(state->csi_client);
	}

	if (state->chip_info->flags & ADV7180_FLAG_I2P) {
		state->vpp_client = i2c_new_dummy(client->adapter,
		state->vpp_client = i2c_new_dummy_device(client->adapter,
				ADV7180_DEFAULT_VPP_I2C_ADDR);
		if (!state->vpp_client) {
			ret = -ENOMEM;
		if (IS_ERR(state->vpp_client)) {
			ret = PTR_ERR(state->vpp_client);
			goto err_unregister_csi_client;
		}
	}