Commit af503ac
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
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3514 | 3514 | | |
3515 | 3515 | | |
3516 | 3516 | | |
3517 | | - | |
| 3517 | + | |
3518 | 3518 | | |
3519 | 3519 | | |
3520 | 3520 | | |
| |||
3545 | 3545 | | |
3546 | 3546 | | |
3547 | 3547 | | |
3548 | | - | |
3549 | | - | |
3550 | 3548 | | |
3551 | 3549 | | |
3552 | 3550 | | |
| |||
0 commit comments