Skip to content

Commit

Permalink
libertas sdio: claim device before calling sdio_disable_func()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
  • Loading branch information
khoroshilov authored and linvjw committed Dec 5, 2013
1 parent 18a7424 commit eddc633
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/libertas/if_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit eddc633

Please sign in to comment.