watchdog: don't print error when allocating urb fails
PATCH 1/1 watchdog: don't print error when allocating urb fails
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(-)
Signature · 1 line
2.8.1
PATCH 1/1 watchdog: pcwd_usb: don't print error when allocating urb fails
kmalloc will print enough information in case of failure.
Signed-off-by Wolfram Sang <[email protected]>
--- drivers/watchdog/pcwd_usb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/watchdog/pcwd_usb.c +1 -3
@@ -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,
Signature · 1 line
2.8.1
Re: [PATCH] watchdog: pcwd_usb: don't print error when allocating urb fails
Quoted 3 lines · Wolfram Sang
kmalloc will print enough information in case of failure.
Signed-off-by Wolfram Sang <[email protected]>
Reviewed-by Guenter Roeck <[email protected]>
Quoted 23 lines
--- drivers/watchdog/pcwd_usb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/watchdog/pcwd_usb.c +1
-3@@ -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,Signature · 1 line
2.8.1