Commit 5299ff47 authored by Liang He's avatar Liang He Committed by Zheng Zengkai
Browse files

scsi: ufs: host: Hold reference returned by of_parse_phandle()

stable inclusion
from stable-v5.10.135
commit 54a73d65440e8e4683306ef5c25a4525fc8b701e
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5ZWFM

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=54a73d65440e8e4683306ef5c25a4525fc8b701e

--------------------------------

commit a3435afb upstream.

In ufshcd_populate_vreg(), we should hold the reference returned by
of_parse_phandle() and then use it to call of_node_put() for refcount
balance.

Link: https://lore.kernel.org/r/20220719071529.1081166-1-windhl@126.com


Fixes: aa497613 ("ufs: Add regulator enable support")
Reviewed-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarLiang He <windhl@126.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
parent 4ff6d049
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment