提交 d8eddb15 编写于 作者: M Markus Elfring 提交者: 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: NMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 605a74e6
......@@ -354,8 +354,7 @@ void cec_delete_adapter(struct cec_adapter *adap)
if (adap->kthread_config)
kthread_stop(adap->kthread_config);
#if IS_REACHABLE(CONFIG_RC_CORE)
if (adap->rc)
rc_free_device(adap->rc);
rc_free_device(adap->rc);
#endif
kfree(adap);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册