• Om Narasimhan's avatar
    [PATCH] pcmcia: au1000_generic fix · a230a678
    Om Narasimhan authored
    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: default avatarOm Narasimhan <om.turyx@gmail.com>
    Cc: "Yoichi Yuasa" <yoichi_yuasa@tripeaks.co.jp>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarDominik Brodowski <linux@dominikbrodowski.net>
    a230a678
au1000_generic.c 13.7 KB