Re: [PATCH 1/2] usb: gadget: udc: at91: use PTR_ERR_OR_ZERO()

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

 



Le 29/03/2016 11:28, Felipe Balbi a écrit :
> coccicheck found this pattern which could be
> converted to PTR_ERR_OR_ZERO(). No functional
> changes.
> 
> Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxxxxxxxx>

Acked-by: Nicolas Ferre <nicolas.ferre@xxxxxxxxx>

Thanks Felipe for having taken care of this!

Bye,

> ---
>  drivers/usb/gadget/udc/at91_udc.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/gadget/udc/at91_udc.c b/drivers/usb/gadget/udc/at91_udc.c
> index d0d18947f58b..8bc78418d40e 100644
> --- a/drivers/usb/gadget/udc/at91_udc.c
> +++ b/drivers/usb/gadget/udc/at91_udc.c
> @@ -1726,10 +1726,7 @@ static int at91sam9261_udc_init(struct at91_udc *udc)
>  
>  	udc->matrix = syscon_regmap_lookup_by_phandle(udc->pdev->dev.of_node,
>  						      "atmel,matrix");
> -	if (IS_ERR(udc->matrix))
> -		return PTR_ERR(udc->matrix);
> -
> -	return 0;
> +	return PTR_ERR_OR_ZERO(udc->matrix);
>  }
>  
>  static void at91sam9261_udc_pullup(struct at91_udc *udc, int is_on)
> 


-- 
Nicolas Ferre
--
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