]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: i2c: ADV7604: Remove redundant cancel_delayed_work in probe
authorDuoming Zhou <duoming@zju.edu.cn>
Tue, 2 Sep 2025 01:53:37 +0000 (09:53 +0800)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Tue, 14 Oct 2025 13:07:37 +0000 (15:07 +0200)
commit8f34f24355a607b98ecd9924837aab13c676eeca
tree7d68986008bc0cab24642da9adaf71a533b9f136
parente66a5cc606c58e72f18f9cdd868a3672e918f9f8
media: i2c: ADV7604: Remove redundant cancel_delayed_work in probe

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: 54450f591c99 ("[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>
drivers/media/i2c/adv7604.c