Skip to content

Commit af503ac

Browse files
stonezdmUlrich Hecht
authored andcommitted
media: i2c: ADV7604: Remove redundant cancel_delayed_work in probe
commit 8f34f24355a607b98ecd9924837aab13c676eeca upstream. The delayed_work delayed_work_enable_hotplug is initialized with INIT_DELAYED_WORK() in adv76xx_probe(), but it is never scheduled anywhere in the probe function. Calling cancel_delayed_work() on a work that has never been scheduled is redundant and unnecessary, as there is no pending work to cancel. Remove the redundant cancel_delayed_work() from error handling path and adjust the goto label accordingly to simplify the code and avoid potential confusion. Fixes: 54450f5 ("[media] adv7604: driver for the Analog Devices ADV7604 video decoder") Cc: stable@vger.kernel.org Signed-off-by: Duoming Zhou <duoming@zju.edu.cn> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ulrich Hecht <uli@kernel.org>
1 parent 382d62c commit af503ac

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/media/i2c/adv7604.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3514,7 +3514,7 @@ static int adv76xx_probe(struct i2c_client *client,
35143514
err = media_entity_pads_init(&sd->entity, state->source_pad + 1,
35153515
state->pads);
35163516
if (err)
3517-
goto err_work_queues;
3517+
goto err_i2c;
35183518

35193519
/* Configure regmaps */
35203520
err = configure_regmaps(state);
@@ -3545,8 +3545,6 @@ static int adv76xx_probe(struct i2c_client *client,
35453545

35463546
err_entity:
35473547
media_entity_cleanup(&sd->entity);
3548-
err_work_queues:
3549-
cancel_delayed_work(&state->delayed_work_enable_hotplug);
35503548
err_i2c:
35513549
adv76xx_unregister_clients(state);
35523550
err_hdl:

0 commit comments

Comments
 (0)