Re: [PATCH] staging: rtl8723bs: use guard(mutex) in ips_enter()

From: Greg Kroah-Hartman

Date: Fri Jul 31 2026 - 01:26:33 EST


On Thu, Jul 30, 2026 at 05:17:13PM -0600, Ivy Lopez wrote:
> 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.

Yes, but as stated before, that's great for new code, but for existing
code that is not broken, you should just leave it alone and not convert
to using guard().

thanks,

greg k-h