[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1303233066.2988.14.camel@bwh-desktop>
Date: Tue, 19 Apr 2011 18:11:06 +0100
From: Ben Hutchings <bhutchings@...arflare.com>
To: Paul Stewart <pstew@...omium.org>
Cc: netdev@...r.kernel.org, davem@...emloft.net
Subject: Re: [PATCH] usbnet: Resubmit interrupt URB more often
On Tue, 2011-04-19 at 09:35 -0700, Paul Stewart wrote:
[...]
> index 4342bd9..e4dbb29 100644
> --- a/drivers/usb/core/urb.c
> +++ b/drivers/usb/core/urb.c
> @@ -295,7 +295,9 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
> struct usb_host_endpoint *ep;
> int is_out;
>
> - if (!urb || urb->hcpriv || !urb->complete)
> + if (urb->hcpriv)
> + return -EALREADY;
> + if (!urb || !urb->complete)
> return -EINVAL;
[...]
The test for !urb must come before the test on urb->hcpriv.
Also, the kernel coding style does not allow '//' comments. Please use
scripts/checkpatch.pl to check for style and other common errors.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists