Commit d8eddb15 authored by Markus Elfring's avatar Markus Elfring Committed by Mauro Carvalho Chehab

[media] cec: Delete an unnecessary check before the function call "rc_free_device"

The rc_free_device() function tests whether its argument is NULL
and then returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 605a74e6
...@@ -354,7 +354,6 @@ void cec_delete_adapter(struct cec_adapter *adap) ...@@ -354,7 +354,6 @@ void cec_delete_adapter(struct cec_adapter *adap)
if (adap->kthread_config) if (adap->kthread_config)
kthread_stop(adap->kthread_config); kthread_stop(adap->kthread_config);
#if IS_REACHABLE(CONFIG_RC_CORE) #if IS_REACHABLE(CONFIG_RC_CORE)
if (adap->rc)
rc_free_device(adap->rc); rc_free_device(adap->rc);
#endif #endif
kfree(adap); kfree(adap);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment