linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org, Michael Buesch <mb@bu3sch.de>
Subject: [PATCH] Fix a null pointer check in ssb mipscore init
Date: Sun, 14 Oct 2007 21:04:22 +0200	[thread overview]
Message-ID: <47126836.5000906@openwrt.org> (raw)

Fix a null pointer check in ssb mipscore init

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

--- a/drivers/ssb/driver_mipscore.c
+++ b/drivers/ssb/driver_mipscore.c
@@ -171,20 +171,21 @@ u32 ssb_cpu_clock(struct ssb_mipscore *mcore)
 	return rate;
 }

 void ssb_mipscore_init(struct ssb_mipscore *mcore)
 {
-	struct ssb_bus *bus = mcore->dev->bus;
+	struct ssb_bus *bus;
 	struct ssb_device *dev;
 	unsigned long hz, ns;
 	unsigned int irq, i;

 	if (!mcore->dev)
 		return; /* We don't have a MIPS core */

 	ssb_dprintk(KERN_INFO PFX "Initializing MIPS core...\n");

+	bus = mcore->dev->bus;
 	hz = ssb_clockspeed(bus);
 	if (!hz)
 		hz = 100000000;
 	ns = 1000000000 / hz;



             reply	other threads:[~2007-10-14 19:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-14 19:04 Felix Fietkau [this message]
2007-10-14 19:10 ` [PATCH] Fix a null pointer check in ssb mipscore init Michael Buesch

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=47126836.5000906@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mb@bu3sch.de \
    /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).