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)
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)
......
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