Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1658900
| From | Johan Hovold <johan@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 2/7] USB: of: document reference taken by child-lookup helper |
| Date | 2017-06-06 18:10 +0200 |
| Message-ID | <tPpdo-2Df-37@gated-at.bofh.it> (permalink) |
| References | <tPpdn-2Df-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Document that the child-node lookup helper takes a reference to the device-tree node which needs to be dropped after use. Signed-off-by: Johan Hovold <johan@kernel.org> --- drivers/usb/core/of.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/core/of.c b/drivers/usb/core/of.c index d563cbcf76cf..3863bb1ce8c5 100644 --- a/drivers/usb/core/of.c +++ b/drivers/usb/core/of.c @@ -28,7 +28,8 @@ * * Find the node from device tree according to its port number. * - * Return: On success, a pointer to the device node, %NULL on failure. + * Return: A pointer to the node with incremented refcount if found, or + * %NULL otherwise. */ struct device_node *usb_of_get_child_node(struct device_node *parent, int portnum) -- 2.13.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/7] driver core/USB/thermal: fix device-tree node reuse Johan Hovold <johan@kernel.org> - 2017-06-06 18:10 +0200 [PATCH v2 1/7] USB: core: fix device node leak Johan Hovold <johan@kernel.org> - 2017-06-06 18:10 +0200 [PATCH v2 3/7] driver core: add helper to reuse a device-tree node Johan Hovold <johan@kernel.org> - 2017-06-06 18:10 +0200 [PATCH v2 2/7] USB: of: document reference taken by child-lookup helper Johan Hovold <johan@kernel.org> - 2017-06-06 18:10 +0200 [PATCH v2 6/7] thermal: max77620: fix device-node reference imbalance Johan Hovold <johan@kernel.org> - 2017-06-06 18:10 +0200
csiph-web