From 46cdd1900fa7a1d7afd1f8d051e513105d0cea98 Mon Sep 17 00:00:00 2001 From: Felipe Balbi Date: Tue, 29 Mar 2016 12:26:06 +0300 Subject: [PATCH] usb: gadget: udc: at91: use PTR_ERR_OR_ZERO() coccicheck found this pattern which could be converted to PTR_ERR_OR_ZERO(). No functional changes. Acked-by: Nicolas Ferre Signed-off-by: Felipe Balbi --- 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) -- 2.39.5