interrupt_cnt_probe() calls mutex_init() but neither this driver
nor the counter core issues a matching mutex_destroy() on unbind,
so the lock debug state is leaked.
Switch to devm_mutex_init() so the mutex is torn down in the same
devm scope it was set up in.
Signed-off-by: Stepan Ionichev <sozdayvek@gmail.com>
Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>
Link: https://lore.kernel.org/r/20260523184418.7586-1-sozdayvek@gmail.com
Signed-off-by: William Breathitt Gray <wbg@kernel.org>
if (ret)
return ret;
- mutex_init(&priv->lock);
+ ret = devm_mutex_init(dev, &priv->lock);
+ if (ret)
+ return ret;
ret = devm_counter_add(dev, counter);
if (ret < 0)