From: walter harms <wharms@bfs.de>
To: kernel-janitors@vger.kernel.org
Subject: Re: [patch] staging: wilc1000: NULL dereference on error
Date: Sat, 16 Jul 2016 10:19:03 +0000 [thread overview]
Message-ID: <578A0A17.8060307@bfs.de> (raw)
In-Reply-To: <20160716100755.GA3346@mwanda>
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 ?
re,
wh
> setup_timer(&periodic_rssi, GetPeriodicRSSI,
> @@ -3391,7 +3391,6 @@ int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler)
>
> clients_count++;
>
> -_fail_mq_:
> destroy_workqueue(hif_workqueue);
> _fail_:
> return result;
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2016-07-16 10:19 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 [this message]
2016-07-16 10:57 ` Dan Carpenter
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=578A0A17.8060307@bfs.de \
--to=wharms@bfs.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.