linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: Pavel Roskin <proski@gnu.org>
Cc: bcm43xx-dev@lists.berlios.de, linux-wireless@vger.kernel.org,
	Larry Finger <larry.finger@lwfinger.net>
Subject: Re: [PATCH] Fix handling of failure to create debugfs directory
Date: Wed, 8 Aug 2007 11:04:56 +0200	[thread overview]
Message-ID: <200708081104.56295.mb@bu3sch.de> (raw)
In-Reply-To: <20070808051710.3902.43211.stgit@dv.roinet.com>

On Wednesday 08 August 2007 07:17:10 Pavel Roskin wrote:
> This can happen if CONFIG_BCM43XX_MAC80211_DEBUG is enabled, but
> CONFIG_DEBUG_FS is not.
> 
> Signed-off-by: Pavel Roskin <proski@gnu.org>
> ---

Thanks, queued.
Larry, this might also apply to bcm4301.

>  .../wireless/bcm43xx-mac80211/bcm43xx_debugfs.c    |    8 ++++++--
>  1 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/wireless/bcm43xx-mac80211/bcm43xx_debugfs.c b/drivers/net/wireless/bcm43xx-mac80211/bcm43xx_debugfs.c
> index 9ca4625..aded2b3 100644
> --- a/drivers/net/wireless/bcm43xx-mac80211/bcm43xx_debugfs.c
> +++ b/drivers/net/wireless/bcm43xx-mac80211/bcm43xx_debugfs.c
> @@ -408,7 +408,7 @@ static struct file_operations restart_fops = {
>  
>  int bcm43xx_debug(struct bcm43xx_wldev *dev, enum bcm43xx_dyndbg feature)
>  {
> -	return !!(dev->dfsentry->dyn_debug[feature]);
> +	return !!(dev->dfsentry && dev->dfsentry->dyn_debug[feature]);
>  }
>  
>  static void bcm43xx_remove_dynamic_debug(struct bcm43xx_wldev *dev)
> @@ -472,7 +472,9 @@ void bcm43xx_debugfs_add_device(struct bcm43xx_wldev *dev)
>  	snprintf(devdir, sizeof(devdir), "%s", wiphy_name(dev->wl->hw->wiphy));
>  	e->subdir = debugfs_create_dir(devdir, fs.root);
>  	if (!e->subdir || IS_ERR(e->subdir)) {
> -		e->subdir = NULL;
> +		bcmerr(dev->wl, "debugfs: cannot create %s directory\n",
> +		       devdir);
> +		dev->dfsentry = NULL;
>  		kfree(log->log);
>  		kfree(e);
>  		return;
> @@ -525,6 +527,8 @@ void bcm43xx_debugfs_log_txstat(struct bcm43xx_wldev *dev,
>  	struct bcm43xx_txstatus *cur;
>  	int i;
>  
> +	if (!e)
> +		return;
>  	log = &e->txstatlog;
>  	assert(irqs_disabled());
>  	spin_lock(&log->lock);

-- 
Greetings Michael.

  parent reply	other threads:[~2007-08-08  9:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-08  5:17 [PATCH] Fix handling of failure to create debugfs directory Pavel Roskin
2007-08-08  5:52 ` Larry Finger
2007-08-08  6:02   ` Larry Finger
2007-08-08 11:16     ` Michael Buesch
2007-08-08 10:38   ` Michael Buesch
2007-08-08  9:04 ` Michael Buesch [this message]
2007-08-08 12:04   ` Larry Finger

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=200708081104.56295.mb@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=bcm43xx-dev@lists.berlios.de \
    --cc=larry.finger@lwfinger.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=proski@gnu.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;
as well as URLs for NNTP newsgroup(s).