linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix a null pointer check in ssb mipscore init
@ 2007-10-14 19:04 Felix Fietkau
  2007-10-14 19:10 ` Michael Buesch
  0 siblings, 1 reply; 2+ messages in thread
From: Felix Fietkau @ 2007-10-14 19:04 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, Michael Buesch

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;



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-10-14 19:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-14 19:04 [PATCH] Fix a null pointer check in ssb mipscore init Felix Fietkau
2007-10-14 19:10 ` Michael Buesch

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).