]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: ufs: host: Hold reference returned by of_parse_phandle()
authorLiang He <windhl@126.com>
Tue, 19 Jul 2022 07:15:29 +0000 (15:15 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Aug 2022 09:59:38 +0000 (11:59 +0200)
commit4b5b34cb528a1f52a19a59eccd4952d07c5dac7c
tree5bf16140d9ff166715e668bbe88110e7aa80531a
parent946daa3e01e2117d219d9919a2809b517e7d178b
scsi: ufs: host: Hold reference returned by of_parse_phandle()

commit 7091ef93b559015426e194bea517ef9a44aa5ec8 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: d44ca2f2de26 ("ufs: Add regulator enable support")
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Liang He <windhl@126.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/ufs/ufshcd-pltfrm.c