All of lore.kernel.org
 help / color / mirror / Atom feed
From: bruno randolf <bruno@thinktube.com>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: ath5k-devel@lists.ath5k.org, linux-wireless@vger.kernel.org,
	linville@tuxdriver.com, mcgrof@gmail.com, mickflemm@gmail.com
Subject: Re: [PATCH] ath5k: add debugfs entries for registers, tsf, beacon, reset
Date: Mon, 10 Dec 2007 18:22:42 +0900	[thread overview]
Message-ID: <200712101822.43487.bruno@thinktube.com> (raw)
In-Reply-To: <475D00D7.10309@gmail.com>

On Monday 10 December 2007 18:03:19 Jiri Slaby wrote:
> > +static int open_file_registers(struct inode *inode, struct file *file)
> > +{
> > +	struct seq_file *s;
> > +	int res;
> > +	res = seq_open(file, &register_seq_ops);
> > +	s = file->private_data;
> > +	s->private = inode->i_private;
>
> Sorry for not noticing this earlier, if res is nonzero, you are
> dereferencing NULL (s) here.

oh, sorry for not realizing that myself. so i add:

+       if (res == 0) {
+               s = file->private_data;
+               s->private = inode->i_private;
+       }

and resend.

thanks,
bruno


  reply	other threads:[~2007-12-10  9:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-10  8:22 [PATCH] ath5k: add debugfs entries for registers, tsf, beacon, reset Bruno Randolf
2007-12-10  9:03 ` Jiri Slaby
2007-12-10  9:22   ` bruno randolf [this message]
2007-12-10  9:27     ` Bruno Randolf
2007-12-10  9:30       ` Jiri Slaby
2007-12-10 10:21         ` [PATCH 1/1] " Bruno Randolf

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=200712101822.43487.bruno@thinktube.com \
    --to=bruno@thinktube.com \
    --cc=ath5k-devel@lists.ath5k.org \
    --cc=jirislaby@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mcgrof@gmail.com \
    --cc=mickflemm@gmail.com \
    /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.