]> git.ipfire.org Git - thirdparty/linux.git/commit
net: dsa: realtek: use devm_mutex_init for regmap lock
authorLuiz Angelo Daros de Luca <luizluca@gmail.com>
Mon, 27 Jul 2026 01:56:09 +0000 (22:56 -0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 30 Jul 2026 01:42:27 +0000 (18:42 -0700)
commit050e07f8765d84b4e74fae239ff7a9f29eb6869c
tree6c82d653c87a744b4544176b058f0ae90a3e0d07
parent70fd0cf29bc47882c1cb11ad4fb2881ac2c1e640
net: dsa: realtek: use devm_mutex_init for regmap 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: 907e772f6f6de ("net: dsa: realtek: allow subdrivers to externally lock regmap")
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-2-5d62ba998791@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/realtek/rtl83xx.c