diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2023-10-26 17:10:12 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@kernel.org> | 2023-10-30 20:23:51 +0300 |
commit | ebab2723d0bd47ea899d339d54e1c4ac459d18c3 (patch) | |
tree | 2500d969f19e95993b439206a6ee305831c8ae75 /drivers/net/wireless | |
parent | a0ddf39ac6420e9b52200973ac07b261db8e7595 (diff) | |
download | linux-ebab2723d0bd47ea899d339d54e1c4ac459d18c3.tar.xz |
wifi: wilc1000: always release SDIO host in wilc_sdio_cmd53()
Ensure 'sdio_release_host()' is always issued on return
from 'wilc_sdio_cmd53()'. Compile tested only.
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Acked-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20231026141016.71407-2-dmantipov@yandex.ru
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/microchip/wilc1000/sdio.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/wireless/microchip/wilc1000/sdio.c b/drivers/net/wireless/microchip/wilc1000/sdio.c index 87948ba69a22..0d13e3e46e98 100644 --- a/drivers/net/wireless/microchip/wilc1000/sdio.c +++ b/drivers/net/wireless/microchip/wilc1000/sdio.c @@ -106,9 +106,10 @@ static int wilc_sdio_cmd53(struct wilc *wilc, struct sdio_cmd53 *cmd) size = cmd->count; if (cmd->use_global_buf) { - if (size > sizeof(u32)) - return -EINVAL; - + if (size > sizeof(u32)) { + ret = -EINVAL; + goto out; + } buf = sdio_priv->cmd53_buf; } @@ -123,7 +124,7 @@ static int wilc_sdio_cmd53(struct wilc *wilc, struct sdio_cmd53 *cmd) if (cmd->use_global_buf) memcpy(cmd->buffer, buf, size); } - +out: sdio_release_host(func); if (ret) |