summaryrefslogtreecommitdiff
path: root/drivers/base/auxiliary.c
diff options
context:
space:
mode:
authorIra Weiny <ira.weiny@intel.com>2021-12-02 07:43:04 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-12-03 18:41:50 +0300
commit8a2d6ffe7740cb8c944968aa9b0705e20afeef87 (patch)
tree8ba37b1838939fa93ae14e31cc293d719bb9eb60 /drivers/base/auxiliary.c
parent14866a7db8da1f61fb6135c461b733694eea9580 (diff)
downloadlinux-8a2d6ffe7740cb8c944968aa9b0705e20afeef87.tar.xz
Documentation/auxiliary_bus: Clarify the release of devices from find device
auxiliary_find_device() takes a proper get_device() reference on the device before returning the matched device. Users of this call should be informed that they need to properly release this reference with put_device(). Signed-off-by: Ira Weiny <ira.weiny@intel.com> Link: https://lore.kernel.org/r/20211202044305.4006853-7-ira.weiny@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/auxiliary.c')
-rw-r--r--drivers/base/auxiliary.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/base/auxiliary.c b/drivers/base/auxiliary.c
index 7192f7d03a05..ab5315681a42 100644
--- a/drivers/base/auxiliary.c
+++ b/drivers/base/auxiliary.c
@@ -202,6 +202,8 @@ EXPORT_SYMBOL_GPL(__auxiliary_device_add);
* This function returns a reference to a device that is 'found'
* for later use, as determined by the @match callback.
*
+ * The reference returned should be released with put_device().
+ *
* The callback should return 0 if the device doesn't match and non-zero
* if it does. If the callback returns non-zero, this function will
* return to the caller and not iterate over any more devices.