Thread (5 messages) 5 messages, 3 authors, 2023-10-30

Re: [PATCH 2/2] wifi: wilc1000: always release SDIO host in wilc_sdio_cmd53()

From: <Ajay.Kathat@microchip.com>
Date: 2023-10-26 23:46:18

Thanks Dmitry

On 10/26/23 07:10, Dmitry Antipov wrote:
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

Ensure 'sdio_release_host()' is always issued on return
from 'wilc_sdio_cmd53()'. Compile tested only.

Signed-off-by: Dmitry Antipov <redacted>
Acked-by: Ajay Singh <ajay.kathat@microchip.com>
quoted hunk ↗ jump to hunk
---
 drivers/net/wireless/microchip/wilc1000/sdio.c | 9 +++++----
 1 file 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)
--
2.41.0
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help