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

[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
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -354,7 +354,6 @@ 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);
#endif
	kfree(adap);