summaryrefslogtreecommitdiffstats
path: root/drivers/reset/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/reset/core.c')
-rw-r--r--drivers/reset/core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/reset/core.c b/drivers/reset/core.c
index ccb97f4e3..1680d2704 100644
--- a/drivers/reset/core.c
+++ b/drivers/reset/core.c
@@ -459,6 +459,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);
}