]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: i2c: adv7842: Remove redundant cancel_delayed_work in probe
authorDuoming Zhou <duoming@zju.edu.cn>
Tue, 2 Sep 2025 01:10:31 +0000 (09:10 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2026 09:14:46 +0000 (10:14 +0100)
commit59f8c23f2bc214107bc99de8b05a508e00ab7a58
tree59563928a93d8bfd5c99e3f4a73165f77fec6b09
parent4f58e5cddcb5a828e0e0d3defe426d91123b0682
media: i2c: adv7842: Remove redundant cancel_delayed_work in probe

commit e66a5cc606c58e72f18f9cdd868a3672e918f9f8 upstream.

The delayed_work delayed_work_enable_hotplug is initialized with
INIT_DELAYED_WORK() in adv7842_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: a89bcd4c6c20 ("[media] adv7842: add new video decoder driver")
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/adv7842.c