Re: [PATCH 2/2] firmware: arm_scmi: Add qcom hvc/shmem transport

Krzysztof Kozlowski
2023-07-19T06:15:36Z

On 18/07/2023 23:16, Nikunj Kela wrote:
>
> On 7/18/2023 11:42 AM, Krzysztof Kozlowski wrote:
>> On 18/07/2023 20:25, Nikunj Kela wrote:
>>>>> +
>>>>> + scmi_info = devm_kzalloc(dev, sizeof(*scmi_info), GFP_KERNEL);
>>>>> + if (!scmi_info)
>>>>> + return -ENOMEM;
>>>>> +
>>>>> + np = of_parse_phandle(cdev->of_node, "shmem", 0);
>>>>> + if (!of_device_is_compatible(np, "arm,scmi-shmem"))
>>>> You leak here reference.
>>> Wouldn't the devm_* API take care of that implicitly? It is same in
>>> smc.c as well.
>> Thanks for bringing my attention to this. I sent a fix for smc.c. Fix
>> your patch as well, please.
> Thanks, I thought you were referring to kzalloc cleanup. Will include
> this fix. BTW, you may need to fix mailbox.c as well.

Indeed, thanks.

Best regards,
Krzysztof