Skip to content

Commit

Permalink
staging: most: Delete an unnecessary check before the function call "…
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
Markus Elfring authored and Greg Kroah-Hartman committed Nov 16, 2015
1 parent c904ffd commit e23afff
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/staging/most/mostcore/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1587,8 +1587,7 @@ int most_start_channel(struct most_interface *iface, int id,
return 0;

error:
if (iface->mod)
module_put(iface->mod);
module_put(iface->mod);
modref--;
mutex_unlock(&c->start_mutex);
return ret;
Expand Down

0 comments on commit e23afff

Please sign in to comment.