]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
driver core: Delete an unnecessary check before the function call "put_device"
authorMarkus Elfring <elfring@users.sourceforge.net>
Thu, 5 Feb 2015 10:48:26 +0000 (11:48 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 10 Feb 2017 10:03:30 +0000 (11:03 +0100)
commit2348b4879642321a6ba75dfc34c7b3c01035c703
tree00bfc0271e4f5bba212e3f34c4b154de29294ba5
parentcb1f02fdce552a4a962cb290571504ceed9c6d7e
driver core: Delete an unnecessary check before the function call "put_device"

commit 5f0163a5ee9cc7c59751768bdfd94a73186debba upstream.

The put_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: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[wt: backported only to ease next patch as suggested by Jiri]

Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/base/core.c