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

staging: most: Delete an unnecessary check before the function call "module_put"

The module_put() 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Markus Elfring and committed by
Greg Kroah-Hartman
e23afff9 c904ffda

+1 -2
+1 -2
drivers/staging/most/mostcore/core.c
··· 1587 1587 return 0; 1588 1588 1589 1589 error: 1590 - if (iface->mod) 1591 - module_put(iface->mod); 1590 + module_put(iface->mod); 1592 1591 modref--; 1593 1592 mutex_unlock(&c->start_mutex); 1594 1593 return ret;