Commit eddc633a authored by Alexey Khoroshilov's avatar Alexey Khoroshilov Committed by John W. Linville

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: default avatarAlexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 18a7424f
...@@ -907,8 +907,8 @@ static int if_sdio_power_on(struct if_sdio_card *card) ...@@ -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); sdio_claim_host(func);
return ret; goto disable;
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment