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 10:03:45 +0000 (12:03 +0200)
commitbdaf56e0df15c0a13d9b14580c478fd7463f9e45
treedfb32f99103f7618813ddb933d7097dbc51270b9
parent7f0a36506809fc54d3b70aa2544c03e03b289364
scsi: ufs: host: Hold reference returned by of_parse_phandle()

commit a3435afba87dc6cd83f5595e7607f3c40f93ef01 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: 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/ufs/ufshcd-pltfrm.c