* [PATCH 2/2] Staging: usb: gadget: Use PTR_ERR_OR_ZERO instead of if(IS_ERR(...)) + PTR_ERR.
@ 2016-02-27 11:41 Sandhya Bankar
2016-02-27 19:42 ` [Outreachy kernel] " Julia Lawall
0 siblings, 1 reply; 2+ messages in thread
From: Sandhya Bankar @ 2016-02-27 11:41 UTC (permalink / raw)
To: outreachy-kernel
Use PTR_ERR_OR_ZERO instead of if(IS_ERR(...)) + PTR_ERR.
Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
---
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 d0d1894..52851ad 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;
+ PTR_ERR_OR_ZERO(udc->matrix);
}
static void at91sam9261_udc_pullup(struct at91_udc *udc, int is_on)
--
1.8.3.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Outreachy kernel] [PATCH 2/2] Staging: usb: gadget: Use PTR_ERR_OR_ZERO instead of if(IS_ERR(...)) + PTR_ERR.
2016-02-27 11:41 [PATCH 2/2] Staging: usb: gadget: Use PTR_ERR_OR_ZERO instead of if(IS_ERR(...)) + PTR_ERR Sandhya Bankar
@ 2016-02-27 19:42 ` Julia Lawall
0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2016-02-27 19:42 UTC (permalink / raw)
To: Sandhya Bankar; +Cc: outreachy-kernel
On Sat, 27 Feb 2016, Sandhya Bankar wrote:
> Use PTR_ERR_OR_ZERO instead of if(IS_ERR(...)) + PTR_ERR.
>
> Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
> ---
> 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 d0d1894..52851ad 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;
> + PTR_ERR_OR_ZERO(udc->matrix);
Same problem here. You need a return.
julia
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-27 19:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-27 11:41 [PATCH 2/2] Staging: usb: gadget: Use PTR_ERR_OR_ZERO instead of if(IS_ERR(...)) + PTR_ERR Sandhya Bankar
2016-02-27 19:42 ` [Outreachy kernel] " Julia Lawall
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.