usb: gadget: udc: at91: use PTR_ERR_OR_ZERO()
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 29 Mar 2016 09:26:06 +0000 (12:26 +0300)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 14 Apr 2016 06:24:38 +0000 (09:24 +0300)
coccicheck found this pattern which could be
converted to PTR_ERR_OR_ZERO(). No functional
changes.

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/udc/at91_udc.c

index d0d18947f58bfdf4147057107d0c36cd2ca20063..8bc78418d40e4fd98636d55c6592ae83ab3f6cf7 100644 (file)
@@ -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)