lkml.org 
[lkml]   [2023]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 4/6] gpio: pisosr: Use devm_gpiochip_add_data() to simplify remove path
From
On 3/7/23 11:44 AM, Andy Shevchenko wrote:
> On Tue, Mar 07, 2023 at 10:54:30AM -0600, Andrew Davis wrote:
>> Use devm version of gpiochip add function to handle removal for us.
>>
>> While here update copyright and module author.
>
> ...
>
>> - mutex_destroy(&gpio->lock);
>
> You need to wrap this into devm.
>

I was thinking that but it seems there is no such thing. Most drivers
just ignore unwinding mutex_init() since it doesn't allocate anything.

mutex_destroy() is a NOP unless you are doing DEBUG builds were
it sets a magic value to check for use-after-free issues.

Andrew

\
 
 \ /
  Last update: 2023-03-27 00:47    [W:0.172 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site