Thread (87 messages) 87 messages, 11 authors, 2023-10-10

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

From: Krzysztof Kozlowski <hidden>
Date: 2023-07-19 06:15:38
Also in: linux-arm-msm, linux-devicetree, lkml

On 18/07/2023 23:16, Nikunj Kela wrote:
On 7/18/2023 11:42 AM, Krzysztof Kozlowski wrote:
quoted
On 18/07/2023 20:25, Nikunj Kela wrote:
quoted
quoted
quoted
+
+	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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help