From: Dmitry Baryshkov Date: Mon, 20 Apr 2009 16:48:28 +0000 (+0100) Subject: [ARM] 5458/1: pcmcia: pxa2xx-sharpsl: check if we do have Scoop config X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ae1036a2f4e8f83b544ddce4f875a1e4e2ac7b62;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git [ARM] 5458/1: pcmcia: pxa2xx-sharpsl: check if we do have Scoop config Check if we really have Scoop config, otherwice we can get a nice Oops during probe. Signed-off-by: Dmitry Eremin-Solenikov Signed-off-by: Russell King --- diff --git a/drivers/pcmcia/pxa2xx_sharpsl.c b/drivers/pcmcia/pxa2xx_sharpsl.c index 1cd02f5a23a0..bc43f78f6f0b 100644 --- a/drivers/pcmcia/pxa2xx_sharpsl.c +++ b/drivers/pcmcia/pxa2xx_sharpsl.c @@ -255,6 +255,9 @@ static int __init sharpsl_pcmcia_init(void) { int ret; + if (!platform_scoop_config) + return -ENODEV; + sharpsl_pcmcia_ops.nr = platform_scoop_config->num_devs; sharpsl_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);