Skip to content

Commit b25e297

Browse files
committed
Merge tag 'reset-fixes-for-v5.5' of git://git.pengutronix.de/git/pza/linux into arm/fixes
Reset controller fixes for v5.5 This tag fixes a memory leak in reset_control_array_put(), which is called by reset_control_put() for reset array controls. The other patches are small kerneldoc comment fixes to avoid documentation build warnings. * tag 'reset-fixes-for-v5.5' of git://git.pengutronix.de/git/pza/linux: reset: fix reset_control_ops kerneldoc comment reset: fix reset_control_get_exclusive kerneldoc comment reset: fix reset_control_lookup kerneldoc comment reset: fix of_reset_control_get_count kerneldoc comment reset: fix of_reset_simple_xlate kerneldoc comment reset: Fix memory leak in reset_control_array_put() Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Olof Johansson <[email protected]>
2 parents 86ec2e1 + f430c7e commit b25e297

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

drivers/reset/core.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ static const char *rcdev_name(struct reset_controller_dev *rcdev)
7676
* of_reset_simple_xlate - translate reset_spec to the reset line number
7777
* @rcdev: a pointer to the reset controller device
7878
* @reset_spec: reset line specifier as found in the device tree
79-
* @flags: a flags pointer to fill in (optional)
8079
*
8180
* This simple translation function should be used for reset controllers
8281
* with 1:1 mapping, where reset lines can be indexed by number without gaps.
@@ -748,6 +747,7 @@ static void reset_control_array_put(struct reset_control_array *resets)
748747
for (i = 0; i < resets->num_rstcs; i++)
749748
__reset_control_put_internal(resets->rstc[i]);
750749
mutex_unlock(&reset_list_mutex);
750+
kfree(resets);
751751
}
752752

753753
/**
@@ -825,9 +825,10 @@ int __device_reset(struct device *dev, bool optional)
825825
}
826826
EXPORT_SYMBOL_GPL(__device_reset);
827827

828-
/**
828+
/*
829829
* APIs to manage an array of reset controls.
830830
*/
831+
831832
/**
832833
* of_reset_control_get_count - Count number of resets available with a device
833834
*

include/linux/reset-controller.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
struct reset_controller_dev;
88

99
/**
10-
* struct reset_control_ops
10+
* struct reset_control_ops - reset controller driver callbacks
1111
*
1212
* @reset: for self-deasserting resets, does all necessary
1313
* things to reset the device
@@ -33,7 +33,7 @@ struct of_phandle_args;
3333
* @provider: name of the reset controller device controlling this reset line
3434
* @index: ID of the reset controller in the reset controller device
3535
* @dev_id: name of the device associated with this reset line
36-
* @con_id name of the reset line (can be NULL)
36+
* @con_id: name of the reset line (can be NULL)
3737
*/
3838
struct reset_control_lookup {
3939
struct list_head list;

include/linux/reset.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ static inline int device_reset_optional(struct device *dev)
143143
* If this function is called more than once for the same reset_control it will
144144
* return -EBUSY.
145145
*
146-
* See reset_control_get_shared for details on shared references to
146+
* See reset_control_get_shared() for details on shared references to
147147
* reset-controls.
148148
*
149149
* Use of id names is optional.

0 commit comments

Comments
 (0)