coccicheck found this pattern which could be
converted to PTR_ERR_OR_ZERO(). No functional
changes.

Signed-off-by: Felipe Balbi <[email protected]>
---
 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.8.0.rc2

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

Reply via email to