@@ -2106,7 +2106,7 @@ static int tc358743_probe(struct i2c_client *client)
CEC_CAP_DEFAULTS | CEC_CAP_MONITOR_ALL, CEC_MAX_LOG_ADDRS);
if (IS_ERR(state->cec_adap)) {
err = PTR_ERR(state->cec_adap);
- goto err_hdl;
+ goto err_async;
}
irq_mask |= MASK_CEC_RMSK | MASK_CEC_TMSK;
#endif
@@ -2162,6 +2162,8 @@ static int tc358743_probe(struct i2c_client *client)
flush_work(&state->work_i2c_poll);
cancel_delayed_work(&state->delayed_work_enable_hotplug);
mutex_destroy(&state->confctl_mutex);
+err_async: __maybe_unused
+ v4l2_async_unregister_subdev(sd);
err_hdl:
media_entity_cleanup(&sd->entity);
v4l2_ctrl_handler_free(&state->hdl);
When allocating a cec adapter, v4l2_async_register_subdev was called already. Remove subdev from async list upon cec error. Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> --- I don't reallylike that __maybe_unused after the label, but I don't know of any other way to get rid of the warning of unused label if CEC support is disabled. drivers/media/i2c/tc358743.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)