Skip to content

Commit

Permalink
USB-SIS: Deletion of an unnecessary check before the function call "u…
Browse files Browse the repository at this point in the history
…sb_put_dev"

The usb_put_dev() 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 25, 2014
1 parent 03f3df8 commit bb2d43e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/usb/misc/sisusbvga/sisusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2472,8 +2472,7 @@ sisusb_delete(struct kref *kref)
if (!sisusb)
return;

if (sisusb->sisusb_dev)
usb_put_dev(sisusb->sisusb_dev);
usb_put_dev(sisusb->sisusb_dev);

sisusb->sisusb_dev = NULL;
sisusb_free_buffers(sisusb);
Expand Down

0 comments on commit bb2d43e

Please sign in to comment.