media: don't print error when allocating urb fails
Subsystems (14)
cover media: 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 (28):
media: dvb-frontends: rtl2832_sdr: don't print error when allocating
urb fails
media: radio: si470x: radio-si470x-usb: don't print error when
allocating urb fails
media: rc: imon: don't print error when allocating urb fails
media: rc: redrat3: don't print error when allocating urb fails
media: usb: airspy: airspy: don't print error when allocating urb
fails
media: usb: as102: as102_usb_drv: don't print error when allocating
urb fails
media: usb: au0828: au0828-video: don't print error when allocating
urb fails
media: usb: cpia2: cpia2_usb: don't print error when allocating urb
fails
media: usb: cx231xx: cx231xx-audio: don't print error when allocating
urb fails
media: usb: cx231xx: cx231xx-core: don't print error when allocating
urb fails
media: usb: cx231xx: cx231xx-vbi: don't print error when allocating
urb fails
media: usb: dvb-usb: dib0700_core: don't print error when allocating
urb fails
media: usb: em28xx: em28xx-audio: don't print error when allocating
urb fails
media: usb: em28xx: em28xx-core: don't print error when allocating urb
fails
media: usb: gspca: benq: don't print error when allocating urb fails
media: usb: gspca: gspca: don't print error when allocating urb fails
media: usb: gspca: konica: don't print error when allocating urb fails
media: usb: hackrf: hackrf: don't print error when allocating urb
fails
media: usb: hdpvr: hdpvr-video: don't print error when allocating urb
fails
media: usb: msi2500: msi2500: don't print error when allocating urb
fails
media: usb: pwc: pwc-if: don't print error when allocating urb fails
media: usb: s2255: s2255drv: don't print error when allocating urb
fails
media: usb: stk1160: stk1160-video: don't print error when allocating
urb fails
media: usb: stkwebcam: stk-webcam: don't print error when allocating
urb fails
media: usb: tm6000: tm6000-dvb: don't print error when allocating urb
fails
media: usb: tm6000: tm6000-video: don't print error when allocating
urb fails
media: usb: usbvision: usbvision-core: don't print error when
allocating urb fails
media: usb: zr364xx: zr364xx: don't print error when allocating urb
fails
drivers/media/dvb-frontends/rtl2832_sdr.c | 1 - drivers/media/radio/si470x/radio-si470x-usb.c | 1 - drivers/media/rc/imon.c | 13 +++---------- drivers/media/rc/redrat3.c | 4 +--- drivers/media/usb/airspy/airspy.c | 1 - drivers/media/usb/as102/as102_usb_drv.c | 2 -- drivers/media/usb/au0828/au0828-video.c | 1 - drivers/media/usb/cpia2/cpia2_usb.c | 1 - drivers/media/usb/cx231xx/cx231xx-audio.c | 2 -- drivers/media/usb/cx231xx/cx231xx-core.c | 4 ---- drivers/media/usb/cx231xx/cx231xx-vbi.c | 2 -- drivers/media/usb/dvb-usb/dib0700_core.c | 4 +--- drivers/media/usb/em28xx/em28xx-audio.c | 1 - drivers/media/usb/em28xx/em28xx-core.c | 1 - drivers/media/usb/gspca/benq.c | 4 +--- drivers/media/usb/gspca/gspca.c | 4 +--- drivers/media/usb/gspca/konica.c | 4 +--- drivers/media/usb/hackrf/hackrf.c | 1 - drivers/media/usb/hdpvr/hdpvr-video.c | 4 +--- drivers/media/usb/msi2500/msi2500.c | 1 - drivers/media/usb/pwc/pwc-if.c | 1 - drivers/media/usb/s2255/s2255drv.c | 9 ++------- drivers/media/usb/stk1160/stk1160-video.c | 4 +--- drivers/media/usb/stkwebcam/stk-webcam.c | 4 +--- drivers/media/usb/tm6000/tm6000-dvb.c | 4 +--- drivers/media/usb/tm6000/tm6000-video.c | 1 - drivers/media/usb/usbvision/usbvision-core.c | 5 +---- drivers/media/usb/zr364xx/zr364xx.c | 4 +--- 28 files changed, 16 insertions(+), 72 deletions(-)
Signature · 1 line
2.8.1
PATCH 1/28 media: dvb-frontends: rtl2832_sdr: don't print error when allocating urb fails
kmalloc will print enough information in case of failure.
--- drivers/media/dvb-frontends/rtl2832_sdr.c | 1 - 1 file changed, 1 deletion(-)
drivers/media/dvb-frontends/rtl2832_sdr.c +0 -1
@@ -392,7 +392,6 @@ static int rtl2832_sdr_alloc_urbs(struct rtl2832_sdr_dev *dev)dev_dbg (&pdev->dev,"alloc urb=%d\n" , i); dev->urb_list[i] =usb_alloc_urb (0 ,GFP_ATOMIC );if (!dev->urb_list[i]) { -dev_dbg (&pdev->dev,"failed\n" );for (j =0 ; j < i; j++)usb_free_urb (dev->urb_list[j]);return -ENOMEM ;
Signature · 1 line
2.8.1
PATCH 2/28 media: radio: si470x: radio-si470x-usb: don't print error when allocating urb fails
In reply to Wolfram Sangkmalloc will print enough information in case of failure.
--- drivers/media/radio/si470x/radio-si470x-usb.c | 1 - 1 file changed, 1 deletion(-)
drivers/media/radio/si470x/radio-si470x-usb.c +0 -1
@@ -627,7 +627,6 @@ static int si470x_usb_driver_probe(struct usb_interface *intf, radio->int_in_urb =usb_alloc_urb (0 ,GFP_KERNEL );if (!radio->int_in_urb) { -dev_info (&intf->dev,"could not allocate int_in_urb" ); retval = -ENOMEM ; goto err_intbuffer; }
Signature · 1 line
2.8.1
PATCH 3/28 media: rc: imon: don't print error when allocating urb fails
In reply to Wolfram Sangkmalloc will print enough information in case of failure.
--- drivers/media/rc/imon.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-)
drivers/media/rc/imon.c +3 -10
@@ -2211,16 +2211,11 @@ static struct imon_context *imon_init_intf0(struct usb_interface *intf, goto exit; } rx_urb =usb_alloc_urb (0 ,GFP_KERNEL ); -if (!rx_urb) { -dev_err (dev,"%s: usb_alloc_urb failed for IR urb" , __func__); +if (!rx_urb) goto rx_urb_alloc_failed; - } tx_urb =usb_alloc_urb (0 ,GFP_KERNEL ); -if (!tx_urb) { -dev_err (dev,"%s: usb_alloc_urb failed for display urb" , - __func__); +if (!tx_urb) goto tx_urb_alloc_failed; - }mutex_init (&ictx->lock);spin_lock_init (&ictx->kc_lock);
@@ -2305,10 +2300,8 @@ static struct imon_context *imon_init_intf1(struct usb_interface *intf,int ret = -ENOMEM ; rx_urb =usb_alloc_urb (0 ,GFP_KERNEL ); -if (!rx_urb) { -pr_err ("usb_alloc_urb failed for IR urb\n" ); +if (!rx_urb) goto rx_urb_alloc_failed; - }mutex_lock (&ictx->lock);
Signature · 1 line
2.8.1
PATCH 4/28 media: rc: redrat3: don't print error when allocating urb fails
In reply to Wolfram Sangkmalloc will print enough information in case of failure.
--- drivers/media/rc/redrat3.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/media/rc/redrat3.c +1 -3
@@ -970,10 +970,8 @@ static int redrat3_dev_probe(struct usb_interface *intf,/* set up bulk-in endpoint */ rr3->read_urb =usb_alloc_urb (0 ,GFP_KERNEL ); -if (!rr3->read_urb) { -dev_err (dev,"Read urb allocation failure\n" ); +if (!rr3->read_urb) goto error; - } rr3->ep_in = ep_in; rr3->bulk_in_buf = usb_alloc_coherent(udev,
Signature · 1 line
2.8.1
PATCH 5/28 media: usb: airspy: airspy: don't print error when allocating urb fails
In reply to Wolfram Sangkmalloc will print enough information in case of failure.
--- drivers/media/usb/airspy/airspy.c | 1 - 1 file changed, 1 deletion(-)
drivers/media/usb/airspy/airspy.c +0 -1
@@ -426,7 +426,6 @@ static int airspy_alloc_urbs(struct airspy *s)dev_dbg (s->dev,"alloc urb=%d\n" , i); s->urb_list[i] =usb_alloc_urb (0 ,GFP_ATOMIC );if (!s->urb_list[i]) { -dev_dbg (s->dev,"failed\n" );for (j =0 ; j < i; j++)usb_free_urb (s->urb_list[j]);return -ENOMEM ;
Signature · 1 line
2.8.1
PATCH 6/28 media: usb: as102: as102_usb_drv: don't print error when allocating urb fails
In reply to Wolfram Sangkmalloc will print enough information in case of failure.
--- drivers/media/usb/as102/as102_usb_drv.c | 2 -- 1 file changed, 2 deletions(-)
drivers/media/usb/as102/as102_usb_drv.c +0 -2
@@ -270,8 +270,6 @@ static int as102_alloc_usb_stream_buffer(struct as102_dev_t *dev) urb =usb_alloc_urb (0 ,GFP_ATOMIC );if (urb ==NULL ) { -dev_dbg (&dev->bus_adap.usb_dev->dev, -"%s: usb_alloc_urb failed\n" , __func__);as102_free_usb_stream_buffer (dev);return -ENOMEM ; }
Signature · 1 line
2.8.1
PATCH 7/28 media: usb: au0828: au0828-video: don't print error when allocating urb fails
In reply to Wolfram Sangkmalloc will print enough information in case of failure.
--- drivers/media/usb/au0828/au0828-video.c | 1 - 1 file changed, 1 deletion(-)
drivers/media/usb/au0828/au0828-video.c +0 -1
@@ -245,7 +245,6 @@ static int au0828_init_isoc(struct au0828_dev *dev, int max_packets,for (i =0 ; i < dev->isoc_ctl.num_bufs; i++) { urb =usb_alloc_urb (max_packets,GFP_KERNEL );if (!urb) { -au0828_isocdbg ("cannot alloc isoc_ctl.urb %i\n" , i);au0828_uninit_isoc (dev);return -ENOMEM ; }
Signature · 1 line
2.8.1
PATCH 8/28 media: usb: cpia2: cpia2_usb: don't print error when allocating urb fails
In reply to Wolfram Sangkmalloc will print enough information in case of failure.
--- drivers/media/usb/cpia2/cpia2_usb.c | 1 - 1 file changed, 1 deletion(-)
drivers/media/usb/cpia2/cpia2_usb.c +0 -1
@@ -662,7 +662,6 @@ static int submit_urbs(struct camera_data *cam) } urb =usb_alloc_urb (FRAMES_PER_DESC ,GFP_KERNEL );if (!urb) { -ERR ("%s: usb_alloc_urb error!\n" , __func__);for (j =0 ; j < i; j++)usb_free_urb (cam->sbuf[j].urb);return -ENOMEM ;
Signature · 1 line
2.8.1
PATCH 9/28 media: usb: cx231xx: cx231xx-audio: don't print error when allocating urb fails
In reply to Wolfram Sangkmalloc will print enough information in case of failure.
--- drivers/media/usb/cx231xx/cx231xx-audio.c | 2 -- 1 file changed, 2 deletions(-)
drivers/media/usb/cx231xx/cx231xx-audio.c +0 -2
@@ -293,7 +293,6 @@ static int cx231xx_init_audio_isoc(struct cx231xx *dev)memset (dev->adev.transfer_buffer[i],0x80 , sb_size); urb =usb_alloc_urb (CX231XX_ISO_NUM_AUDIO_PACKETS ,GFP_ATOMIC );if (!urb) { -dev_err (dev->dev,"usb_alloc_urb failed!\n" );for (j =0 ; j < i; j++) {usb_free_urb (dev->adev.urb[j]);kfree (dev->adev.transfer_buffer[j]);
@@ -355,7 +354,6 @@ static int cx231xx_init_audio_bulk(struct cx231xx *dev)memset (dev->adev.transfer_buffer[i],0x80 , sb_size); urb =usb_alloc_urb (CX231XX_NUM_AUDIO_PACKETS ,GFP_ATOMIC );if (!urb) { -dev_err (dev->dev,"usb_alloc_urb failed!\n" );for (j =0 ; j < i; j++) {usb_free_urb (dev->adev.urb[j]);kfree (dev->adev.transfer_buffer[j]);
Signature · 1 line
2.8.1
PATCH 10/28 media: usb: cx231xx: cx231xx-core: don't print error when allocating urb fails
In reply to Wolfram Sangkmalloc will print enough information in case of failure.
--- drivers/media/usb/cx231xx/cx231xx-core.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/media/usb/cx231xx/cx231xx-core.c +0 -4
@@ -1035,8 +1035,6 @@ int cx231xx_init_isoc(struct cx231xx *dev, int max_packets,for (i =0 ; i < dev->video_mode.isoc_ctl.num_bufs; i++) { urb =usb_alloc_urb (max_packets,GFP_KERNEL );if (!urb) { -dev_err (dev->dev, -"cannot alloc isoc_ctl.urb %i\n" , i);cx231xx_uninit_isoc (dev);return -ENOMEM ; }
@@ -1172,8 +1170,6 @@ int cx231xx_init_bulk(struct cx231xx *dev, int max_packets,for (i =0 ; i < dev->video_mode.bulk_ctl.num_bufs; i++) { urb =usb_alloc_urb (0 ,GFP_KERNEL );if (!urb) { -dev_err (dev->dev, -"cannot alloc bulk_ctl.urb %i\n" , i);cx231xx_uninit_bulk (dev);return -ENOMEM ; }
Signature · 1 line
2.8.1
PATCH 11/28 media: usb: cx231xx: cx231xx-vbi: don't print error when allocating urb fails
In reply to Wolfram Sangkmalloc will print enough information in case of failure.
--- drivers/media/usb/cx231xx/cx231xx-vbi.c | 2 -- 1 file changed, 2 deletions(-)
drivers/media/usb/cx231xx/cx231xx-vbi.c +0 -2
@@ -442,8 +442,6 @@ int cx231xx_init_vbi_isoc(struct cx231xx *dev, int max_packets, urb =usb_alloc_urb (0 ,GFP_KERNEL );if (!urb) { -dev_err (dev->dev, -"cannot alloc bulk_ctl.urb %i\n" , i);cx231xx_uninit_vbi_isoc (dev);return -ENOMEM ; }
Signature · 1 line
2.8.1
PATCH 12/28 media: usb: dvb-usb: dib0700_core: don't print error when allocating urb fails
In reply to Wolfram Sangkmalloc will print enough information in case of failure.
--- drivers/media/usb/dvb-usb/dib0700_core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/media/usb/dvb-usb/dib0700_core.c +1 -3
@@ -783,10 +783,8 @@ int dib0700_rc_setup(struct dvb_usb_device *d, struct usb_interface *intf)/* Starting in firmware 1.20, the RC info is provided on a bulk pipe */ purb =usb_alloc_urb (0 ,GFP_KERNEL ); -if (purb ==NULL ) { -err ("rc usb alloc urb failed" ); +if (purb ==NULL )return -ENOMEM ; - } purb->transfer_buffer =kzalloc (RC_MSG_SIZE_V1_20 ,GFP_KERNEL );if (purb->transfer_buffer ==NULL ) {
Signature · 1 line
2.8.1
PATCH 13/28 media: usb: em28xx: em28xx-audio: don't print error when allocating urb fails
In reply to Wolfram Sangkmalloc will print enough information in case of failure.
--- drivers/media/usb/em28xx/em28xx-audio.c | 1 - 1 file changed, 1 deletion(-)
drivers/media/usb/em28xx/em28xx-audio.c +0 -1
@@ -850,7 +850,6 @@ static int em28xx_audio_urb_init(struct em28xx *dev) urb =usb_alloc_urb (npackets,GFP_ATOMIC );if (!urb) { -em28xx_errdev ("usb_alloc_urb failed!\n" );em28xx_audio_free_urb (dev);return -ENOMEM ; }
Signature · 1 line
2.8.1
PATCH 14/28 media: usb: em28xx: em28xx-core: don't print error when allocating urb fails
In reply to Wolfram Sangkmalloc will print enough information in case of failure.
--- drivers/media/usb/em28xx/em28xx-core.c | 1 - 1 file changed, 1 deletion(-)
drivers/media/usb/em28xx/em28xx-core.c +0 -1
@@ -934,7 +934,6 @@ int em28xx_alloc_urbs(struct em28xx *dev, enum em28xx_mode mode, int xfer_bulk,for (i =0 ; i < usb_bufs->num_bufs; i++) { urb =usb_alloc_urb (usb_bufs->num_packets,GFP_KERNEL );if (!urb) { -em28xx_err ("cannot alloc usb_ctl.urb %i\n" , i);em28xx_uninit_usb_xfer (dev, mode);return -ENOMEM ; }
Signature · 1 line
2.8.1
PATCH 15/28 media: usb: gspca: benq: don't print error when allocating urb fails
In reply to Wolfram Sangkmalloc will print enough information in case of failure.
--- drivers/media/usb/gspca/benq.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/media/usb/gspca/benq.c +1 -3
@@ -95,10 +95,8 @@ static int sd_start(struct gspca_dev *gspca_dev)#define SD_NPKT 32for (n =0 ; n <4 ; n++) { urb =usb_alloc_urb (SD_NPKT ,GFP_KERNEL ); -if (!urb) { -pr_err ("usb_alloc_urb failed\n" ); +if (!urb)return -ENOMEM ; - } gspca_dev->urb[n] = urb; urb->transfer_buffer = usb_alloc_coherent(gspca_dev->dev, SD_PKT_SZ * SD_NPKT,
Signature · 1 line
2.8.1
PATCH 16/28 media: usb: gspca: gspca: don't print error when allocating urb fails
In reply to Wolfram Sangkmalloc will print enough information in case of failure.
--- drivers/media/usb/gspca/gspca.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/media/usb/gspca/gspca.c +1 -3
@@ -795,10 +795,8 @@ static int create_urbs(struct gspca_dev *gspca_dev,for (n =0 ; n < nurbs; n++) { urb =usb_alloc_urb (npkt,GFP_KERNEL ); -if (!urb) { -pr_err ("usb_alloc_urb failed\n" ); +if (!urb)return -ENOMEM ; - } gspca_dev->urb[n] = urb; urb->transfer_buffer = usb_alloc_coherent(gspca_dev->dev, bsize,
Signature · 1 line
2.8.1
PATCH 17/28 media: usb: gspca: konica: don't print error when allocating urb fails
In reply to Wolfram Sangkmalloc will print enough information in case of failure.
--- drivers/media/usb/gspca/konica.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/media/usb/gspca/konica.c +1 -3
@@ -208,10 +208,8 @@ static int sd_start(struct gspca_dev *gspca_dev) packet_size =le16_to_cpu (alt->endpoint[i].desc.wMaxPacketSize); urb =usb_alloc_urb (SD_NPKT ,GFP_KERNEL ); -if (!urb) { -pr_err ("usb_alloc_urb failed\n" ); +if (!urb)return -ENOMEM ; - } gspca_dev->urb[n] = urb; urb->transfer_buffer = usb_alloc_coherent(gspca_dev->dev, packet_size * SD_NPKT,
Signature · 1 line
2.8.1
PATCH 18/28 media: usb: hackrf: hackrf: don't print error when allocating urb fails
In reply to Wolfram Sangkmalloc will print enough information in case of failure.
--- drivers/media/usb/hackrf/hackrf.c | 1 - 1 file changed, 1 deletion(-)
drivers/media/usb/hackrf/hackrf.c +0 -1
@@ -691,7 +691,6 @@ static int hackrf_alloc_urbs(struct hackrf_dev *dev, bool rcv)dev_dbg (dev->dev,"alloc urb=%d\n" , i); dev->urb_list[i] =usb_alloc_urb (0 ,GFP_ATOMIC );if (!dev->urb_list[i]) { -dev_dbg (dev->dev,"failed\n" );for (j =0 ; j < i; j++)usb_free_urb (dev->urb_list[j]);return -ENOMEM ;
Signature · 1 line
2.8.1
PATCH 19/28 media: usb: hdpvr: hdpvr-video: don't print error when allocating urb fails
In reply to Wolfram Sangkmalloc will print enough information in case of failure.
--- drivers/media/usb/hdpvr/hdpvr-video.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/media/usb/hdpvr/hdpvr-video.c +1 -3
@@ -155,10 +155,8 @@ int hdpvr_alloc_buffers(struct hdpvr_device *dev, uint count) buf->dev = dev; urb =usb_alloc_urb (0 ,GFP_KERNEL ); -if (!urb) { -v4l2_err (&dev->v4l2_dev,"cannot allocate urb\n" ); +if (!urb) goto exit_urb; - } buf->urb = urb; mem = usb_alloc_coherent(dev->udev, dev->bulk_in_size, GFP_KERNEL,
Signature · 1 line
2.8.1
PATCH 20/28 media: usb: msi2500: msi2500: don't print error when allocating urb fails
In reply to Wolfram Sangkmalloc will print enough information in case of failure.
--- drivers/media/usb/msi2500/msi2500.c | 1 - 1 file changed, 1 deletion(-)
drivers/media/usb/msi2500/msi2500.c +0 -1
@@ -509,7 +509,6 @@ static int msi2500_isoc_init(struct msi2500_dev *dev)for (i =0 ; i <MAX_ISO_BUFS ; i++) { urb =usb_alloc_urb (ISO_FRAMES_PER_DESC ,GFP_KERNEL );if (urb ==NULL ) { -dev_err (dev->dev,"Failed to allocate urb %d\n" , i);msi2500_isoc_cleanup (dev);return -ENOMEM ; }
Signature · 1 line
2.8.1
PATCH 21/28 media: usb: pwc: pwc-if: don't print error when allocating urb fails
In reply to Wolfram Sangkmalloc will print enough information in case of failure.
--- drivers/media/usb/pwc/pwc-if.c | 1 - 1 file changed, 1 deletion(-)
drivers/media/usb/pwc/pwc-if.c +0 -1
@@ -410,7 +410,6 @@ retry:for (i =0 ; i <MAX_ISO_BUFS ; i++) { urb =usb_alloc_urb (ISO_FRAMES_PER_DESC ,GFP_KERNEL );if (urb ==NULL ) { -PWC_ERROR ("Failed to allocate urb %d\n" , i);pwc_isoc_cleanup (pdev);return -ENOMEM ; }
Signature · 1 line
2.8.1
PATCH 22/28 media: usb: s2255: s2255drv: don't print error when allocating urb fails
In reply to Wolfram Sangkmalloc will print enough information in case of failure.
--- drivers/media/usb/s2255/s2255drv.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/media/usb/s2255/s2255drv.c +2 -7
@@ -2113,11 +2113,8 @@ static int s2255_start_readpipe(struct s2255_dev *dev) pipe_info->state =1 ; pipe_info->err_count =0 ; pipe_info->stream_urb =usb_alloc_urb (0 ,GFP_KERNEL ); -if (!pipe_info->stream_urb) { -dev_err (&dev->udev->dev, -"ReadStream: Unable to alloc URB\n" ); +if (!pipe_info->stream_urb)return -ENOMEM ; - }/* transfer buffer allocated in board_init */ usb_fill_bulk_urb(pipe_info->stream_urb, dev->udev, pipe,
@@ -2290,10 +2287,8 @@ static int s2255_probe(struct usb_interface *interface, } dev->fw_data->fw_urb =usb_alloc_urb (0 ,GFP_KERNEL ); -if (!dev->fw_data->fw_urb) { -dev_err (&interface->dev,"out of memory!\n" ); +if (!dev->fw_data->fw_urb) goto errorFWURB; - } dev->fw_data->pfw_data =kzalloc (CHUNK_SIZE ,GFP_KERNEL );if (!dev->fw_data->pfw_data) {
Signature · 1 line
2.8.1
PATCH 23/28 media: usb: stk1160: stk1160-video: don't print error when allocating urb fails
In reply to Wolfram Sangkmalloc will print enough information in case of failure.
--- drivers/media/usb/stk1160/stk1160-video.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/media/usb/stk1160/stk1160-video.c +1 -3
@@ -457,10 +457,8 @@ int stk1160_alloc_isoc(struct stk1160 *dev)for (i =0 ; i < num_bufs; i++) { urb =usb_alloc_urb (max_packets,GFP_KERNEL ); -if (!urb) { -stk1160_err ("cannot alloc urb[%d]\n" , i); +if (!urb) goto free_i_bufs; - } dev->isoc_ctl.urb[i] = urb;#ifndef CONFIG_DMA_NONCOHERENT
Signature · 1 line
2.8.1
PATCH 24/28 media: usb: stkwebcam: stk-webcam: don't print error when allocating urb fails
In reply to Wolfram Sangkmalloc will print enough information in case of failure.
--- drivers/media/usb/stkwebcam/stk-webcam.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/media/usb/stkwebcam/stk-webcam.c +1 -3
@@ -452,10 +452,8 @@ static int stk_prepare_iso(struct stk_camera *dev)STK_ERROR ("isobuf data already allocated\n" );if (dev->isobufs[i].urb ==NULL ) { urb =usb_alloc_urb (ISO_FRAMES_PER_DESC ,GFP_KERNEL ); -if (urb ==NULL ) { -STK_ERROR ("Failed to allocate URB %d\n" , i); +if (urb ==NULL ) goto isobufs_out; - } dev->isobufs[i].urb = urb; }else {STK_ERROR ("Killing URB\n" );
Signature · 1 line
2.8.1
PATCH 25/28 media: usb: tm6000: tm6000-dvb: don't print error when allocating urb fails
In reply to Wolfram Sangkmalloc will print enough information in case of failure.
--- drivers/media/usb/tm6000/tm6000-dvb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/media/usb/tm6000/tm6000-dvb.c +1 -3
@@ -129,10 +129,8 @@ static int tm6000_start_stream(struct tm6000_core *dev) } dvb->bulk_urb =usb_alloc_urb (0 ,GFP_KERNEL ); -if (dvb->bulk_urb ==NULL ) { -printk (KERN_ERR "tm6000: couldn't allocate urb\n" ); +if (dvb->bulk_urb ==NULL )return -ENOMEM ; - } pipe =usb_rcvbulkpipe (dev->udev, dev->bulk_in.endp->desc.bEndpointAddress &USB_ENDPOINT_NUMBER_MASK );
Signature · 1 line
2.8.1
PATCH 26/28 media: usb: tm6000: tm6000-video: don't print error when allocating urb fails
In reply to Wolfram Sangkmalloc will print enough information in case of failure.
--- drivers/media/usb/tm6000/tm6000-video.c | 1 - 1 file changed, 1 deletion(-)
drivers/media/usb/tm6000/tm6000-video.c +0 -1
@@ -635,7 +635,6 @@ static int tm6000_prepare_isoc(struct tm6000_core *dev)for (i =0 ; i < dev->isoc_ctl.num_bufs; i++) { urb =usb_alloc_urb (max_packets,GFP_KERNEL );if (!urb) { -tm6000_err ("cannot alloc isoc_ctl.urb %i\n" , i);tm6000_uninit_isoc (dev);usb_free_urb (urb);return -ENOMEM ;
Signature · 1 line
2.8.1
PATCH 27/28 media: usb: usbvision: usbvision-core: don't print error when allocating urb fails
In reply to Wolfram Sangkmalloc will print enough information in case of failure.
--- drivers/media/usb/usbvision/usbvision-core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/media/usb/usbvision/usbvision-core.c +1 -4
@@ -2303,11 +2303,8 @@ int usbvision_init_isoc(struct usb_usbvision *usbvision)struct urb *urb; urb =usb_alloc_urb (USBVISION_URB_FRAMES ,GFP_KERNEL ); -if (urb ==NULL ) { -dev_err (&usbvision->dev->dev, -"%s: usb_alloc_urb() failed\n" , __func__); +if (urb ==NULL )return -ENOMEM ; - } usbvision->sbuf[buf_idx].urb = urb; usbvision->sbuf[buf_idx].data = usb_alloc_coherent(usbvision->dev,
Signature · 1 line
2.8.1
PATCH 28/28 media: usb: zr364xx: zr364xx: don't print error when allocating urb fails
In reply to Wolfram Sangkmalloc will print enough information in case of failure.
--- drivers/media/usb/zr364xx/zr364xx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/media/usb/zr364xx/zr364xx.c +1 -3
@@ -1045,10 +1045,8 @@ static int zr364xx_start_readpipe(struct zr364xx_camera *cam) pipe_info->state =1 ; pipe_info->err_count =0 ; pipe_info->stream_urb =usb_alloc_urb (0 ,GFP_KERNEL ); -if (!pipe_info->stream_urb) { -dev_err (&cam->udev->dev,"ReadStream: Unable to alloc URB\n" ); +if (!pipe_info->stream_urb)return -ENOMEM ; - }/* transfer buffer allocated in board_init */ usb_fill_bulk_urb(pipe_info->stream_urb, cam->udev, pipe,
Signature · 1 line
2.8.1
Quoted 5 lines · Wolfram Sang
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-ENOMEMcases. gkh acked this approach when we talked about it at LCJ in Tokyo a few weeks ago.
I've taken all of these through the usb tree given the delay in response from the media developers :)
thanks,
greg k-h