aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2017-02-01 02:05:22 -0500
committerPhilipp Zabel <p.zabel@pengutronix.de>2017-02-01 10:04:25 -0500
commit4891486fb2c80eaf3bb0f9eb065d15ecd357702f (patch)
treed9941a0080b78bea105eb0a3b65a8b43ea7e27f2
parentbb475230b8e59a547ab66ac3b02572df21a580e9 (diff)
reset: core: fix reset_control_put
Commit "reset: make optional functions really optional" missed to adjust one check in reset_control_put, causing a NULL pointer access for optional resets. Fixes: bb475230b8e5 "reset: make optional functions really optional" Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
-rw-r--r--drivers/reset/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/reset/core.c b/drivers/reset/core.c
index c79cce3a7b6d..71ccf281dce3 100644
--- a/drivers/reset/core.c
+++ b/drivers/reset/core.c
@@ -392,7 +392,7 @@ EXPORT_SYMBOL_GPL(__of_reset_control_get);
392 392
393void reset_control_put(struct reset_control *rstc) 393void reset_control_put(struct reset_control *rstc)
394{ 394{
395 if (IS_ERR(rstc)) 395 if (IS_ERR_OR_NULL(rstc))
396 return; 396 return;
397 397
398 mutex_lock(&reset_list_mutex); 398 mutex_lock(&reset_list_mutex);