Skip to content

Commit

Permalink
usb: gadget: udc: lpc32xx: remove unnecessary NULL check
Browse files Browse the repository at this point in the history
debugfs_remove() is safe against NULL pointers, so
let's remove the unnecessary NULL check before
calling it.

Acked-by: Peter Chen <peter.chen@freeescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Felipe Balbi committed Nov 25, 2014
1 parent 6cd6159 commit 23fba80
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/usb/gadget/udc/lpc32xx_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,7 @@ static void create_debug_file(struct lpc32xx_udc *udc)

static void remove_debug_file(struct lpc32xx_udc *udc)
{
if (udc->pde)
debugfs_remove(udc->pde);
debugfs_remove(udc->pde);
}

#else
Expand Down

0 comments on commit 23fba80

Please sign in to comment.