瀏覽代碼

libertas sdio: claim device before calling sdio_disable_func()

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>
Alexey Khoroshilov 11 年之前
父節點
當前提交
eddc633a3a
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      drivers/net/wireless/libertas/if_sdio.c

+ 2 - 2
drivers/net/wireless/libertas/if_sdio.c

@@ -907,8 +907,8 @@ static int if_sdio_power_on(struct if_sdio_card *card)
 	sdio_release_host(func);
 	sdio_release_host(func);
 	ret = if_sdio_prog_firmware(card);
 	ret = if_sdio_prog_firmware(card);
 	if (ret) {
 	if (ret) {
-		sdio_disable_func(func);
-		return ret;
+		sdio_claim_host(func);
+		goto disable;
 	}
 	}
 
 
 	return 0;
 	return 0;