diff options
| author | Ingo Molnar <[email protected]> | 2024-01-08 11:57:28 +0000 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2024-01-08 11:57:28 +0000 |
| commit | cdb3033e191fd03da2d7da23b9cd448dfa180a8e (patch) | |
| tree | e863d55e63bea2bc9c18652e0d7291fec5e5cd23 /drivers/reset/core.c | |
| parent | sched/fair: Remove unused 'next_buddy_marked' local variable in check_preempt... (diff) | |
| parent | sched/fair: Fix tg->load when offlining a CPU (diff) | |
| download | kernel-cdb3033e191fd03da2d7da23b9cd448dfa180a8e.tar.gz kernel-cdb3033e191fd03da2d7da23b9cd448dfa180a8e.zip | |
Merge branch 'sched/urgent' into sched/core, to pick up pending v6.7 fixes for the v6.8 merge window
This fix didn't make it upstream in time, pick it up
for the v6.8 merge window.
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'drivers/reset/core.c')
| -rw-r--r-- | drivers/reset/core.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/reset/core.c b/drivers/reset/core.c index 7ece6a8e9858..4d5a78d3c085 100644 --- a/drivers/reset/core.c +++ b/drivers/reset/core.c @@ -807,6 +807,9 @@ static void __reset_control_put_internal(struct reset_control *rstc) { lockdep_assert_held(&reset_list_mutex); + if (IS_ERR_OR_NULL(rstc)) + return; + kref_put(&rstc->refcnt, __reset_control_release); } @@ -1017,11 +1020,8 @@ EXPORT_SYMBOL_GPL(reset_control_put); void reset_control_bulk_put(int num_rstcs, struct reset_control_bulk_data *rstcs) { mutex_lock(&reset_list_mutex); - while (num_rstcs--) { - if (IS_ERR_OR_NULL(rstcs[num_rstcs].rstc)) - continue; + while (num_rstcs--) __reset_control_put_internal(rstcs[num_rstcs].rstc); - } mutex_unlock(&reset_list_mutex); } EXPORT_SYMBOL_GPL(reset_control_bulk_put); |
