Re: [PATCH] media: iris: use devm_mutex_init()
From: Johan Hovold
Date: Tue Dec 23 2025 - 09:10:48 EST
On Tue, Dec 23, 2025 at 11:25:28AM +0100, Bartosz Golaszewski wrote:
> Drop the call to mutex_destroy() in .remove() by using the managed API
> in .probe().
You commit message should explain *why* you think this should be done.
mutex_destroy() doesn't free anything and is just used for a pretty
useless debugging feature. And devres is not free and increases runtime
memory consumption.
And you're also adding more lines than you are removing.
Johan