kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang <wsa-dev@xxxxxxxxxxxxxxxxxxxx> --- drivers/media/usb/gspca/benq.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/usb/gspca/benq.c b/drivers/media/usb/gspca/benq.c index 790baed339639d..5fa67b78ad49b1 100644 --- a/drivers/media/usb/gspca/benq.c +++ b/drivers/media/usb/gspca/benq.c @@ -95,10 +95,8 @@ static int sd_start(struct gspca_dev *gspca_dev) #define SD_NPKT 32 for (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, -- 2.8.1 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html