Re: [PATCH] platform/surface: aggregator: Add missing fwnode_handle_put()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 3/22/23 13:41, Maximilian Luz wrote:
> On 3/22/23 04:30, Liang He wrote:
>> In fwnode_for_each_child_node(), we should add
>> fwnode_handle_put() when break out of the iteration
>> fwnode_for_each_child_node() as it will automatically
>> increase and decrease the refcounter.
>>
>> Fixes: fc622b3d36e6 ("platform/surface: Set up Surface Aggregator device registry")
>> Signed-off-by: Liang He <windhl@xxxxxxx>
>> ---
>>   drivers/platform/surface/aggregator/bus.c | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/platform/surface/aggregator/bus.c b/drivers/platform/surface/aggregator/bus.c
>> index de539938896e..b501a79f2a08 100644
>> --- a/drivers/platform/surface/aggregator/bus.c
>> +++ b/drivers/platform/surface/aggregator/bus.c
>> @@ -485,8 +485,10 @@ int __ssam_register_clients(struct device *parent, struct ssam_controller *ctrl,
>>            * device, so ignore it and continue with the next one.
>>            */
>>           status = ssam_add_client_device(parent, ctrl, child);
>> -        if (status && status != -ENODEV)
>> +        if (status && status != -ENODEV) {
>> +            fwnode_handle_put(child);
>>               goto err;
>> +        }
>>       }
>>         return 0;
> 
> Thanks for spotting this.
> 
> Reviewed-by: Maximilian Luz <luzmaximilian@xxxxxxxxx>

Thank you both for the patch / review, I've applied
this patch to the pdx86/fixes branch now:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=fixes

I will include this patch in my next fixes pull-req to Linus
for the current kernel development cycle.

Regards,

Hans




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux