mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-04 16:15:11 +00:00
reset: core: fix reset_control_put
commit4891486fb2
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:bb475230b8
"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>
This commit is contained in:
parent
ca58e3b2fc
commit
d4b89ecc29
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue