Fix a null pointer check in ssb mipscore init
PATCH 1/1 Fix a null pointer check in ssb mipscore init
Fix a null pointer check in ssb mipscore init
Signed-off-by Felix Fietkau <[email protected]>
drivers/ssb/driver_mipscore.c +2 -1
@@ -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;
Quoted 3 lines · On Sunday 14 October 2007 21:04:22 Felix Fietkau wrote:
Fix a null pointer check in ssb mipscore init
Signed-off-by Felix Fietkau <[email protected]>
Acked-by Michael Buesch <[email protected]>
Quoted 28 lines
drivers/ssb/driver_mipscore.c +2
-1@@ -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;
Signature · 1 line
Greetings Michael.