Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

irda: Delete an unnecessary check before the function call "irlmp_unregister_service"

The irlmp_unregister_service() 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: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Markus Elfring and committed by
David S. Miller
37b8e1ca b3047a77

+1 -2
+1 -2
net/irda/af_irda.c
··· 2123 2123 } 2124 2124 2125 2125 /* Unregister any old registration */ 2126 - if (self->skey) 2127 - irlmp_unregister_service(self->skey); 2126 + irlmp_unregister_service(self->skey); 2128 2127 2129 2128 self->skey = irlmp_register_service((__u16) opt); 2130 2129 break;