Commit ebab2723 authored by Dmitry Antipov's avatar Dmitry Antipov Committed by Kalle Valo

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: default avatarDmitry Antipov <dmantipov@yandex.ru>
Acked-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20231026141016.71407-2-dmantipov@yandex.ru
parent a0ddf39a
...@@ -106,9 +106,10 @@ static int wilc_sdio_cmd53(struct wilc *wilc, struct sdio_cmd53 *cmd) ...@@ -106,9 +106,10 @@ static int wilc_sdio_cmd53(struct wilc *wilc, struct sdio_cmd53 *cmd)
size = cmd->count; size = cmd->count;
if (cmd->use_global_buf) { if (cmd->use_global_buf) {
if (size > sizeof(u32)) if (size > sizeof(u32)) {
return -EINVAL; ret = -EINVAL;
goto out;
}
buf = sdio_priv->cmd53_buf; buf = sdio_priv->cmd53_buf;
} }
...@@ -123,7 +124,7 @@ static int wilc_sdio_cmd53(struct wilc *wilc, struct sdio_cmd53 *cmd) ...@@ -123,7 +124,7 @@ static int wilc_sdio_cmd53(struct wilc *wilc, struct sdio_cmd53 *cmd)
if (cmd->use_global_buf) if (cmd->use_global_buf)
memcpy(cmd->buffer, buf, size); memcpy(cmd->buffer, buf, size);
} }
out:
sdio_release_host(func); sdio_release_host(func);
if (ret) if (ret)
......
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