* [PATCH] watchdog: don't print error when allocating urb fails
@ 2016-08-11 21:23 Wolfram Sang
2016-08-11 21:23 ` [PATCH] watchdog: pcwd_usb: " Wolfram Sang
0 siblings, 1 reply; 3+ messages in thread
From: Wolfram Sang @ 2016-08-11 21:23 UTC (permalink / raw)
To: linux-usb; +Cc: Wolfram Sang, linux-watchdog
This per-subsystem series is part of a tree wide cleanup. usb_alloc_urb() uses
kmalloc which already prints enough information on failure. So, let's simply
remove those "allocation failed" messages from drivers like we did already for
other -ENOMEM cases. gkh acked this approach when we talked about it at LCJ in
Tokyo a few weeks ago.
Wolfram Sang (1):
watchdog: pcwd_usb: don't print error when allocating urb fails
drivers/watchdog/pcwd_usb.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--
2.8.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] watchdog: pcwd_usb: don't print error when allocating urb fails
2016-08-11 21:23 [PATCH] watchdog: don't print error when allocating urb fails Wolfram Sang
@ 2016-08-11 21:23 ` Wolfram Sang
2016-08-11 23:39 ` Guenter Roeck
0 siblings, 1 reply; 3+ messages in thread
From: Wolfram Sang @ 2016-08-11 21:23 UTC (permalink / raw)
To: linux-usb; +Cc: Wolfram Sang, Wim Van Sebroeck, Guenter Roeck, linux-watchdog
kmalloc will print enough information in case of failure.
Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
---
drivers/watchdog/pcwd_usb.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/watchdog/pcwd_usb.c b/drivers/watchdog/pcwd_usb.c
index 68952d9ccf8394..99ebf6ea3de648 100644
--- a/drivers/watchdog/pcwd_usb.c
+++ b/drivers/watchdog/pcwd_usb.c
@@ -666,10 +666,8 @@ static int usb_pcwd_probe(struct usb_interface *interface,
/* allocate the urb's */
usb_pcwd->intr_urb = usb_alloc_urb(0, GFP_KERNEL);
- if (!usb_pcwd->intr_urb) {
- pr_err("Out of memory\n");
+ if (!usb_pcwd->intr_urb)
goto error;
- }
/* initialise the intr urb's */
usb_fill_int_urb(usb_pcwd->intr_urb, udev, pipe,
--
2.8.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] watchdog: pcwd_usb: don't print error when allocating urb fails
2016-08-11 21:23 ` [PATCH] watchdog: pcwd_usb: " Wolfram Sang
@ 2016-08-11 23:39 ` Guenter Roeck
0 siblings, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2016-08-11 23:39 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linux-usb, Wim Van Sebroeck, linux-watchdog
On Thu, Aug 11, 2016 at 11:23:40PM +0200, Wolfram Sang wrote:
> kmalloc will print enough information in case of failure.
>
> Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/watchdog/pcwd_usb.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/watchdog/pcwd_usb.c b/drivers/watchdog/pcwd_usb.c
> index 68952d9ccf8394..99ebf6ea3de648 100644
> --- a/drivers/watchdog/pcwd_usb.c
> +++ b/drivers/watchdog/pcwd_usb.c
> @@ -666,10 +666,8 @@ static int usb_pcwd_probe(struct usb_interface *interface,
>
> /* allocate the urb's */
> usb_pcwd->intr_urb = usb_alloc_urb(0, GFP_KERNEL);
> - if (!usb_pcwd->intr_urb) {
> - pr_err("Out of memory\n");
> + if (!usb_pcwd->intr_urb)
> goto error;
> - }
>
> /* initialise the intr urb's */
> usb_fill_int_urb(usb_pcwd->intr_urb, udev, pipe,
> --
> 2.8.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-08-11 23:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-11 21:23 [PATCH] watchdog: don't print error when allocating urb fails Wolfram Sang
2016-08-11 21:23 ` [PATCH] watchdog: pcwd_usb: " Wolfram Sang
2016-08-11 23:39 ` Guenter Roeck
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.