]> git.karo-electronics.de Git - linux-beck.git/commit
[PATCH] pcmcia: au1000_generic fix
authorOm Narasimhan <om.turyx@gmail.com>
Fri, 20 Oct 2006 21:44:15 +0000 (14:44 -0700)
committerDominik Brodowski <linux@dominikbrodowski.net>
Thu, 26 Oct 2006 01:59:42 +0000 (21:59 -0400)
commita230a6785dd5af84b8b043a64d8df8adc81f3724
treef882cb5538776f5aa8a88731f7e34a8f2887e3c9
parentf465ce176fb2f1778a04fc3fcb2b8aa564901419
[PATCH] pcmcia: au1000_generic fix

The previous code did something like,

if (error) goto out_err;
....
do {
             struct au1000_pcmcia_socket *skt = PCMCIA_SOCKET(i);
              del_timer_sync(&skt->poll_timer);
               pcmcia_unregister_socket(&skt->socket);
out_err:
               flush_scheduled_work();
               ops->hw_shutdown(skt);
               i--;
} while (i > 0)
.....

- On the error path, skt would not contain a valid value for the first
  iteration (skt is masked by uninitialized automatic skt)

- Does not do hw_shutdown() for 0th element of PCMCIA_SOCKET

Signed-off-by: Om Narasimhan <om.turyx@gmail.com>
Cc: "Yoichi Yuasa" <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
drivers/pcmcia/au1000_generic.c