lkml.org 
[lkml]   [2006]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH]: Add check return result while call create_workqueue() for ipw2200
On Thu, 27 Jul 2006, Randy.Dunlap wrote:

> On Thu, 27 Jul 2006, Joe Jin wrote:
>
> > Add check return result on call create_workqueue().
> >
> > Signed-off-by: Joe Jin <lkmaillist@gmail.com>
> > ---
> >
> > --- linux-2.6.17.7/drivers/net/wireless/ipw2200.c 2006-07-27
> > 20:27:01.000000000 +0800
> > +++ linux.new/drivers/net/wireless/ipw2200.c 2006-07-27
> > 20:28:22.000000000 +0800
> > @@ -10139,6 +10139,9 @@
> > int ret = 0;
> >
> > priv->workqueue = create_workqueue(DRV_NAME);
> > + if(NULL == priv->workqueue){
> > + return -ENOMEM;
> > + }
>
> Makes sense, but style needs some changes:
>
> a. space after "if"
> b. put NULL on righth side of ==, or use !priv->workqueue
> c. no {} braces for one-line "blocks"
> d. if braces were being used, put a space between ) and {
>
> And <ret> is useless (not needed) in that function unless the code
> is changed to have a single exit point.

One more thing: the patch is whitespace-damaged. Something
converted all tabs to spaces. Could have been a mail client
or copy-and-paste... Did you use the gmail web interface
or gmail via SMTP? gmail web interface does not preserve
tabs AFAIK.

> > init_waitqueue_head(&priv->wait_command_queue);
> > init_waitqueue_head(&priv->wait_state);
> >

--
~Randy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-07-27 19:07    [W:0.038 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site