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] Change-Id: I06382c480dac9a93c36d3dd30c62a546a8057f73 Signed-off-by: Willy Tarreau <w@1wt.eu>
This commit is contained in:
parent
bfefe97700
commit
22127365e3
|
@ -1161,8 +1161,7 @@ done:
|
|||
kobject_del(&dev->kobj);
|
||||
Error:
|
||||
cleanup_glue_dir(dev, glue_dir);
|
||||
if (parent)
|
||||
put_device(parent);
|
||||
put_device(parent);
|
||||
name_error:
|
||||
kfree(dev->p);
|
||||
dev->p = NULL;
|
||||
|
|
Loading…
Reference in New Issue