Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);