Linux wireless drivers development
 help / color / mirror / Atom feed
From: Dominique Martinet <asmadeus@codewreck.org>
To: Arend van Spriel <arend@broadcom.com>
Cc: linux-wireless@vger.kernel.org, Julia Lawall <julia@diku.dk>,
	Julian Calaby <julian.calaby@gmail.com>
Subject: Re: [PATCH] brcm80211: smac: eliminate a null pointer dereference in dma.c
Date: Sat, 29 Oct 2011 12:25:02 +0200	[thread overview]
Message-ID: <20111029102502.GA10582@nautica> (raw)
In-Reply-To: <1319880615-3000-1-git-send-email-arend@broadcom.com>

Hi,


Arend van Spriel wrote on Sat, Oct 29, 2011:
> Though it's unlikely, di may be null, so we can't dereference
> di->dma.dmactrlflags until we've checked it.

I've got no experience whatsoever in kernel coding so feel free to tell
me that's stupid, but if you say it's unlikely why not use the
unlikely() macro as well for the check?
(also, that's not the point of this patch, but can't hurt to point that
out)


>  	if (di == NULL) {
would change to
if (unlikely(di == NULL)) {


Regards,
-- 
Asmadeus | Dominique Martinet

  reply	other threads:[~2011-10-29 10:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-29  9:30 [PATCH] brcm80211: smac: eliminate a null pointer dereference in dma.c Arend van Spriel
2011-10-29 10:25 ` Dominique Martinet [this message]
2011-10-29 10:44   ` Julian Calaby

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=20111029102502.GA10582@nautica \
    --to=asmadeus@codewreck.org \
    --cc=arend@broadcom.com \
    --cc=julia@diku.dk \
    --cc=julian.calaby@gmail.com \
    --cc=linux-wireless@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