Unverified Commit 53f0a815 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!9000 media: tc358743: register v4l2 async device only after successful setup

parents edb51648 49c168a0
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -2108,9 +2108,6 @@ static int tc358743_probe(struct i2c_client *client)
	state->mbus_fmt_code = MEDIA_BUS_FMT_RGB888_1X24;

	sd->dev = &client->dev;
	err = v4l2_async_register_subdev(sd);
	if (err < 0)
		goto err_hdl;

	mutex_init(&state->confctl_mutex);

@@ -2168,6 +2165,10 @@ static int tc358743_probe(struct i2c_client *client)
	if (err)
		goto err_work_queues;

	err = v4l2_async_register_subdev(sd);
	if (err < 0)
		goto err_work_queues;

	v4l2_info(sd, "%s found @ 0x%x (%s)\n", client->name,
		  client->addr << 1, client->adapter->name);