]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
libertas sdio: claim device before calling sdio_disable_func()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Mon, 18 Nov 2013 21:45:08 +0000 (01:45 +0400)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 5 Dec 2013 19:56:24 +0000 (14:56 -0500)
There is a failure path in if_sdio_power_on(), where
sdio_disable_func() is called without claiming the device.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/if_sdio.c

index 828e7f4fc6332e0ea3c621a354915f50a70515ac..58c6ee5de98f9256b2e3db4735adbfe1fed299bd 100644 (file)
@@ -907,8 +907,8 @@ static int if_sdio_power_on(struct if_sdio_card *card)
        sdio_release_host(func);
        ret = if_sdio_prog_firmware(card);
        if (ret) {
-               sdio_disable_func(func);
-               return ret;
+               sdio_claim_host(func);
+               goto disable;
        }
 
        return 0;