RE: [PATCH 1/2] usb: gadget: udc: lpc32xx: remove unnecessary NULL check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
> 
> debugfs_remove() is safe against NULL pointers, so let's remove the
> unnecessary NULL check before calling it.
> 
> Cc: Peter Chen <peter.chen@xxxxxxxxxxxxx>
> Cc: Jingoo Han <jg1.han@xxxxxxxxxxx>
> Signed-off-by: Felipe Balbi <balbi@xxxxxx>
> ---
>  drivers/usb/gadget/udc/lpc32xx_udc.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/gadget/udc/lpc32xx_udc.c
> b/drivers/usb/gadget/udc/lpc32xx_udc.c
> index 4be497d..9765296 100644
> --- a/drivers/usb/gadget/udc/lpc32xx_udc.c
> +++ b/drivers/usb/gadget/udc/lpc32xx_udc.c
> @@ -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
 
Acked-by: Peter Chen <peter.chen@xxxxxxxxxxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux