[ARM] 5458/1: pcmcia: pxa2xx-sharpsl: check if we do have Scoop config
authorDmitry Baryshkov <dbaryshkov@gmail.com>
Mon, 20 Apr 2009 16:48:28 +0000 (17:48 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 23 Apr 2009 22:25:40 +0000 (23:25 +0100)
Check if we really have Scoop config, otherwice we can get a nice Oops
during probe.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/pcmcia/pxa2xx_sharpsl.c

index 1cd02f5..bc43f78 100644 (file)
@@ -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);