summaryrefslogtreecommitdiff
path: root/drivers/reset/core.c
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2017-02-01 08:05:22 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-08 13:05:08 +0100
commitd4b89ecc29514792c3e37ec509fba9e283dbd5e7 (patch)
tree07827472544d6188cb5af23c19bab6e116cc3c63 /drivers/reset/core.c
parentca58e3b2fc54bec2b740f391a713c92e0cbf9a76 (diff)
reset: core: fix reset_control_put
commit 4891486fb2c80eaf3bb0f9eb065d15ecd357702f upstream. 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> Cc: Dinh Nguyen <dinguyen@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/reset/core.c')
-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 75821417b799..f62f57ebc45a 100644
--- a/drivers/reset/core.c
+++ b/drivers/reset/core.c
@@ -358,7 +358,7 @@ EXPORT_SYMBOL_GPL(__of_reset_control_get);
void reset_control_put(struct reset_control *rstc)
{
- if (IS_ERR(rstc))
+ if (IS_ERR_OR_NULL(rstc))
return;
mutex_lock(&reset_list_mutex);