]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2026 09:17:05 +0000 (10:17 +0100)
commit4d3c49fea27956dd82aadcb20949f1cf9222e8c1
treef4f8319540c0d931d1e3080df53506f2f95db3d9
parent4d08b38a9828481cb0d33686fdce6f9d90a0350f
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: 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/i2c/adv7604.c