diff options
author | Felix Fietkau <nbd@openwrt.org> | 2007-10-14 15:04:22 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2007-10-16 21:04:11 -0400 |
commit | 7007d00caca268e1ba2bcaa6bed4a6456a96884b (patch) | |
tree | 7432ffd80e167e55a16b5c61c1741ea08990ce29 /drivers | |
parent | 58a9ac17ed7a78958d03f3b4af107f0ef075cbed (diff) |
[PATCH] ssb: Fix a null pointer check in mipscore init
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ssb/driver_mipscore.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/ssb/driver_mipscore.c b/drivers/ssb/driver_mipscore.c index ab8691a3258..3d3dd32bf3a 100644 --- a/drivers/ssb/driver_mipscore.c +++ b/drivers/ssb/driver_mipscore.c | |||
@@ -173,7 +173,7 @@ u32 ssb_cpu_clock(struct ssb_mipscore *mcore) | |||
173 | 173 | ||
174 | void ssb_mipscore_init(struct ssb_mipscore *mcore) | 174 | void ssb_mipscore_init(struct ssb_mipscore *mcore) |
175 | { | 175 | { |
176 | struct ssb_bus *bus = mcore->dev->bus; | 176 | struct ssb_bus *bus; |
177 | struct ssb_device *dev; | 177 | struct ssb_device *dev; |
178 | unsigned long hz, ns; | 178 | unsigned long hz, ns; |
179 | unsigned int irq, i; | 179 | unsigned int irq, i; |
@@ -183,6 +183,7 @@ void ssb_mipscore_init(struct ssb_mipscore *mcore) | |||
183 | 183 | ||
184 | ssb_dprintk(KERN_INFO PFX "Initializing MIPS core...\n"); | 184 | ssb_dprintk(KERN_INFO PFX "Initializing MIPS core...\n"); |
185 | 185 | ||
186 | bus = mcore->dev->bus; | ||
186 | hz = ssb_clockspeed(bus); | 187 | hz = ssb_clockspeed(bus); |
187 | if (!hz) | 188 | if (!hz) |
188 | hz = 100000000; | 189 | hz = 100000000; |