]> git.ipfire.org Git - thirdparty/linux.git/commit
net: dsa: realtek: use devm_mutex_init for l2_lock
authorLuiz Angelo Daros de Luca <luizluca@gmail.com>
Mon, 27 Jul 2026 01:56:11 +0000 (22:56 -0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 30 Jul 2026 01:42:27 +0000 (18:42 -0700)
commit442ecdc83d00d6c2312541c4e0ada47e02805fcb
tree6d6483daa1897f8f65e7d90585d7a24fea072b09
parenta95f3e9b8985fc0e21bfcf727e941c1f03476927
net: dsa: realtek: use devm_mutex_init for l2_lock

With CONFIG_DEBUG_MUTEXES enabled, mutex_destroy() needs to be called
before the lock is discarded. Use devm_mutex_init() instead so the
cleanup is handled automatically.

Fixes: 336e3e4a1ab37 ("net: dsa: realtek: rtl8365mb: add FDB support")
Reviewed-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Reviewed-by: Alvin Šipraga <alvin.sipraga@analog.com>
Link: https://patch.msgid.link/20260726-realtek_mutext-v2-4-5d62ba998791@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/realtek/rtl83xx.c