From 03cf33ae734ff1182851327b3aea35bcd8db625b Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Fri, 21 Mar 2003 02:23:19 -0800 Subject: [PATCH] [PATCH] fix pcmcia crash with hostap --- drivers/pcmcia/cs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c index 7ea8dfbc91b43..f235eb1fda733 100644 --- a/drivers/pcmcia/cs.c +++ b/drivers/pcmcia/cs.c @@ -895,6 +895,10 @@ int pcmcia_access_configuration_register(client_handle_t handle, c = &s->config[reg->Function]; } else c = CONFIG(handle); + + if (c == NULL) + return CS_NO_CARD; + if (!(c->state & CONFIG_LOCKED)) return CS_CONFIGURATION_LOCKED; -- 2.53.0