public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [patch] staging: wilc1000: NULL dereference on error
Date: Sat, 16 Jul 2016 10:57:06 +0000	[thread overview]
Message-ID: <20160716105706.GH32301@mwanda> (raw)
In-Reply-To: <20160716100755.GA3346@mwanda>

On Sat, Jul 16, 2016 at 12:19:03PM +0200, walter harms wrote:
> 
> 
> Am 16.07.2016 12:07, schrieb Dan Carpenter:
> > We can't pass NULL pointers to destroy_workqueue().
> > 
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > 
> > diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
> > index 0b1760c..78f524f 100644
> > --- a/drivers/staging/wilc1000/host_interface.c
> > +++ b/drivers/staging/wilc1000/host_interface.c
> > @@ -3363,7 +3363,7 @@ int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler)
> >  		if (!hif_workqueue) {
> >  			netdev_err(vif->ndev, "Failed to create workqueue\n");
> >  			result = -ENOMEM;
> > -			goto _fail_mq_;
> > +			goto _fail_;
> >  		}
> >  
> 
> 
> maybe this is the point where return -ENOMEM; is the most simple solution ?

Yeah.  This code is staging quality.  There are lots of other cleanups
someone could do.  Later patches...

regards,
dan carpenter


      parent reply	other threads:[~2016-07-16 10:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-16 10:07 [patch] staging: wilc1000: NULL dereference on error Dan Carpenter
2016-07-16 10:19 ` walter harms
2016-07-16 10:57 ` Dan Carpenter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160716105706.GH32301@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox