Skip to content

Commit

Permalink
[PATCH] ssb: Fix a null pointer check in mipscore init
Browse files Browse the repository at this point in the history
Fix a null pointer check in ssb mipscore init

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Felix Fietkau authored and John W. Linville committed Oct 17, 2007
1 parent 58a9ac1 commit 7007d00
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/ssb/driver_mipscore.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ u32 ssb_cpu_clock(struct ssb_mipscore *mcore)

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;
Expand All @@ -183,6 +183,7 @@ void ssb_mipscore_init(struct ssb_mipscore *mcore)

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

bus = mcore->dev->bus;
hz = ssb_clockspeed(bus);
if (!hz)
hz = 100000000;
Expand Down

0 comments on commit 7007d00

Please sign in to comment.