From: Vihas Makwana <makvihas@gmail.com>
To: Larry Finger <Larry.Finger@lwfinger.net>,
Phillip Potter <phil@philpotter.co.uk>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Michael Straube <straube.linux@gmail.com>,
Martin Kaiser <martin@kaiser.cx>,
Dan Carpenter <dan.carpenter@oracle.com>,
Pavel Skripkin <paskripkin@gmail.com>
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Vihas Makwana <makvihas@gmail.com>
Subject: [PATCH 1/2] staging: r8188eu: call _cancel_timer_ex from _rtw_free_recv_priv
Date: Wed, 9 Mar 2022 02:25:09 +0530 [thread overview]
Message-ID: <20220308205510.48431-2-makvihas@gmail.com> (raw)
In-Reply-To: <20220308205510.48431-1-makvihas@gmail.com>
The _rtw_init_recv_priv() initializes precvpriv->signal_stat_timer and
sets it's timeout interval to 1000 ms. But _rtw_free_recv_priv()
doesn't cancel the timer and we need to explicitly call
_cancel_timer_ex() after we call _rtw_free_recv_priv() to cancel the
timer.
Call _cancel_timer_ex() from inside _rtw_free_recv_priv() as every init
function needs a matching free function.
Signed-off-by: Vihas Makwana <makvihas@gmail.com>
---
drivers/staging/r8188eu/core/rtw_recv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index d77d98351..61308eb39 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -103,6 +103,7 @@ void _rtw_free_recv_priv(struct recv_priv *precvpriv)
vfree(precvpriv->pallocated_frame_buf);
rtl8188eu_free_recv_priv(padapter);
+ _cancel_timer_ex(&precvpriv->signal_stat_timer);
}
struct recv_frame *_rtw_alloc_recvframe(struct __queue *pfree_recv_queue)
--
2.30.2
next prev parent reply other threads:[~2022-03-08 20:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-08 20:55 [PATCH 0/2] staging: r8188eu: improve error handling Vihas Makwana
2022-03-08 20:55 ` Vihas Makwana [this message]
2022-03-09 7:59 ` [PATCH 1/2] staging: r8188eu: call _cancel_timer_ex from _rtw_free_recv_priv Dan Carpenter
2022-03-09 9:51 ` Vihas Makwana
2022-03-08 20:55 ` [PATCH 2/2] staging: r8188eu: proper error handling in rtw_init_drv_sw Vihas Makwana
2022-03-08 21:13 ` Pavel Skripkin
2022-03-09 8:02 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220308205510.48431-2-makvihas@gmail.com \
--to=makvihas@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=dan.carpenter@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=martin@kaiser.cx \
--cc=paskripkin@gmail.com \
--cc=phil@philpotter.co.uk \
--cc=straube.linux@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox