linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: flamingice@sourmilk.net
Cc: linux-wireless@vger.kernel.org
Subject: [patch] wireless: potential null deref in p54spi.c
Date: Sun, 19 Jul 2009 14:53:57 +0300 (EAT)	[thread overview]
Message-ID: <alpine.DEB.2.00.0907171607280.12306@bicker> (raw)

We can't use dev_err() becuase "priv" is NULL.

Found by smatch (http://repo.or.cz/w/smatch.git).

regards,
dan carpenter

Signed-off-by: Dan Carpenter <error27@gmail.com>

--- orig/drivers/net/wireless/p54/p54spi.c	2009-07-17 16:04:20.000000000 +0300
+++ new/drivers/net/wireless/p54/p54spi.c	2009-07-17 16:05:28.000000000 +0300
@@ -635,7 +635,7 @@
 
 	hw = p54_init_common(sizeof(*priv));
 	if (!hw) {
-		dev_err(&priv->spi->dev, "could not alloc ieee80211_hw");
+		printk(KERN_ERR "could not alloc ieee80211_hw");
 		return -ENOMEM;
 	}
 

             reply	other threads:[~2009-07-19 12:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-19 11:53 Dan Carpenter [this message]
2009-07-19 19:26 ` [PATCH v2] p54spi: fix potential null deref in p54spi.c Christian Lamparter
2009-07-22 14:40   ` 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=alpine.DEB.2.00.0907171607280.12306@bicker \
    --to=error27@gmail.com \
    --cc=flamingice@sourmilk.net \
    --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;
as well as URLs for NNTP newsgroup(s).