From: Ivy Lopez <skunkolee@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Ivy Lopez <skunkolee@gmail.com>
Subject: [PATCH] staging: rtl8723bs: use guard(mutex) in ips_enter()
Date: Thu, 30 Jul 2026 17:17:13 -0600 [thread overview]
Message-ID: <20260730231714.81977-1-skunkolee@gmail.com> (raw)
Replace manual mutex_lock()/mutex_unlock() in ips_enter() with
guard(mutex) from linux/cleanup.h. This is a single-exit function
so the conversion is a direct drop-in and removes the need to
manually balance the unlock.
Signed-off-by: Ivy Lopez <skunkolee@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
index b9f8cf1014ed..141c322befb6 100644
--- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
@@ -6,6 +6,7 @@
******************************************************************************/
#include <drv_types.h>
#include <hal_data.h>
+#include <linux/cleanup.h>
#include <linux/jiffies.h>
void _ips_enter(struct adapter *padapter)
@@ -37,9 +38,8 @@ void ips_enter(struct adapter *padapter)
hal_btcoex_IpsNotify(padapter, pwrpriv->ips_mode_req);
- mutex_lock(&pwrpriv->lock);
+ guard(mutex)(&pwrpriv->lock);
_ips_enter(padapter);
- mutex_unlock(&pwrpriv->lock);
}
int _ips_leave(struct adapter *padapter)
--
2.55.0
next reply other threads:[~2026-07-30 23:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 23:17 Ivy Lopez [this message]
2026-07-30 23:17 ` [PATCH] staging: rtl8723bs: use kfree_sensitive() for key material in rtw_set_key() Ivy Lopez
2026-07-30 23:20 ` Ivy Lopez
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=20260730231714.81977-1-skunkolee@gmail.com \
--to=skunkolee@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.