Re: [PATCH v2 1/3] media: venus: Add support for static video encoder/decoder declarations

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

 



On 28/11/2024 09:02, Vladimir Zapolskiy wrote:
+    np = of_changeset_create_node(ocs, dev->of_node, node_name);
+    if (!np) {
+        dev_err(dev, "Unable to create new node\n");
+        return -ENODEV;

Leaked reference to np.

I don't believe that's a leak, because you only release np when it is non-NULL.

+    }
+
+    ret = of_changeset_add_prop_string(ocs, np, "compatible", compat);
+    if (ret)
+        dev_err(dev, "unable to add %s\n", compat);
+
+    of_node_put(np);

Which we do here.

However, I think I have missed a of_changeset_destroy(ocs); on the error path.

@ref drivers/pci/of.c::of_pci_make_dev_node()

---
bod





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux