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)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 27 Jul 2022 01:51:40 +0000 (21:51 -0400)
commita3435afba87dc6cd83f5595e7607f3c40f93ef01
tree56d70039cdf9d6acdf4c0fcdd1575824ec29809b
parent0fde22c5420ed258ee538a760291c2f3935f6a01
scsi: ufs: host: Hold reference returned by of_parse_phandle()

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: aa4976130934 ("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>
drivers/ufs/host/ufshcd-pltfrm.c