From: Brian Swetland Date: Thu, 29 Jan 2009 04:25:40 +0000 (-0800) Subject: [ARM] msm: smd: don't crash if the smd channel table doesn't exist X-Git-Tag: v2.6.35-rc1~497^2~48 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4d4fb2660ddd2d8131ebc3314e4c648fc0f4b8dd;p=karo-tx-linux.git [ARM] msm: smd: don't crash if the smd channel table doesn't exist Signed-off-by: Brian Swetland Signed-off-by: Daniel Walker --- diff --git a/arch/arm/mach-msm/smd.c b/arch/arm/mach-msm/smd.c index 64d12323995e..78031c0a6db3 100644 --- a/arch/arm/mach-msm/smd.c +++ b/arch/arm/mach-msm/smd.c @@ -204,7 +204,10 @@ static void smd_channel_probe_worker(struct work_struct *work) unsigned n; shared = smem_find(ID_CH_ALLOC_TBL, sizeof(*shared) * 64); - + if (!shared) { + pr_err("smd: cannot find allocation table\n"); + return; + } for (n = 0; n < 64; n++) { if (smd_ch_allocated[n]) continue;