Commit 4891486f authored by Heiner Kallweit's avatar Heiner Kallweit Committed by Philipp Zabel

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: bb475230 "reset: make optional functions really optional"
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
parent bb475230
......@@ -392,7 +392,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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment