From: Felix Fietkau Date: Sun, 14 Oct 2007 19:04:22 +0000 (+0200) Subject: [PATCH] ssb: Fix a null pointer check in mipscore init X-Git-Tag: upstream/snapshot3+hdmi~29598^2~28^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7007d00caca268e1ba2bcaa6bed4a6456a96884b;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git [PATCH] ssb: Fix a null pointer check in mipscore init Fix a null pointer check in ssb mipscore init Signed-off-by: Felix Fietkau Acked-by: Michael Buesch Signed-off-by: John W. Linville --- diff --git a/drivers/ssb/driver_mipscore.c b/drivers/ssb/driver_mipscore.c index ab8691a..3d3dd32 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) 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; @@ -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;