From: J Freyensee <james_p_freyensee@linux.intel.com>
To: Jesper Juhl <jj@chaosbits.net>
Cc: gregkh@suse.de, linux-kernel@vger.kernel.org,
suhail.ahmed@intel.com, christophe.guerard@intel.com
Subject: Re: [PATCH 3/4] Intel PTI implementaiton of MIPI 1149.7.
Date: Thu, 05 May 2011 10:06:03 -0700 [thread overview]
Message-ID: <1304615163.8860.58.camel@localhost> (raw)
In-Reply-To: <alpine.LNX.2.00.1104240306570.28014@swampdragon.chaosbits.net>
On Sun, 2011-04-24 at 03:08 +0200, Jesper Juhl wrote:
> On Sun, 24 Apr 2011, Jesper Juhl wrote:
>
> > On Fri, 22 Apr 2011, james_p_freyensee@linux.intel.com wrote:
> >
> ...
> > > +static void pti_tty_cleanup(struct tty_struct *tty)
> > > +{
> > > + struct pti_tty *pti_tty_data;
> > > + struct pti_masterchannel *mc;
> > > +
> > > + pti_tty_data = tty->driver_data;
> > > +
> > > + if (pti_tty_data != NULL) {
> > > + mc = pti_tty_data->mc;
> > > + pti_release_masterchannel(mc);
> > > + pti_tty_data->mc = NULL;
> > > + }
> > > +
> > > + if (pti_tty_data != NULL)
> > > + kfree(pti_tty_data);
> > > +
> > > + tty->driver_data = NULL;
> > > +}
> >
> > How about this instead?
> >
> > static void pti_tty_cleanup(struct tty_struct *tty)
> > {
> > if (!tty->driver_data)
> > return;
> > pti_release_masterchannel(tty->driver_data->mc);
I like this suggestion. I'll incorporate this.
> > kfree(tty->driver_data);
I'm no means an expert in the kernel, but I assume kfree() is like C
free(), that it's a nop if it receives a NULL value?
> > }
> >
> I meant to say :
>
> static void pti_tty_cleanup(struct tty_struct *tty)
> {
> if (!tty->driver_data)
> return;
> pti_release_masterchannel(tty->driver_data->mc);
> kfree(tty->driver_data);
> tty->driver_data = NULL
> }
>
>
next prev parent reply other threads:[~2011-05-05 17:06 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-22 23:32 [PATCH 3/4] Intel PTI implementaiton of MIPI 1149.7 james_p_freyensee
2011-04-24 0:55 ` Jesper Juhl
2011-04-24 1:08 ` Jesper Juhl
2011-05-05 17:06 ` J Freyensee [this message]
2011-05-05 20:37 ` Jesper Juhl
2011-05-05 17:27 ` J Freyensee
2011-05-05 20:42 ` Jesper Juhl
2011-05-05 22:30 ` J Freyensee
-- strict thread matches above, loose matches on Subject: below --
2011-05-06 23:56 james_p_freyensee
2011-04-19 22:58 james_p_freyensee
2011-04-19 23:15 ` Randy Dunlap
2011-04-20 23:05 ` J Freyensee
2011-04-20 23:10 ` Randy Dunlap
2011-04-21 21:06 ` J Freyensee
2011-04-21 21:17 ` Randy Dunlap
2011-04-20 1:25 ` David Rientjes
2011-04-20 9:46 ` Alan Cox
2011-04-20 18:07 ` J Freyensee
2011-04-22 17:57 ` J Freyensee
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=1304615163.8860.58.camel@localhost \
--to=james_p_freyensee@linux.intel.com \
--cc=christophe.guerard@intel.com \
--cc=gregkh@suse.de \
--cc=jj@chaosbits.net \
--cc=linux-kernel@vger.kernel.org \
--cc=suhail.ahmed@intel.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.