]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 16 Sep 2022 08:53:41 +0000 (10:53 +0200)
commita24566b312c56b59f87020ca493d84cd7ff90af7
tree3bd5a43d5341af63a82e8f248da8a9bb84e4b796
parent5ac2f08f82930960e80182ee45b39e5b96a25f46
scsi: ufs: host: Hold reference returned by of_parse_phandle()

BugLink: https://bugs.launchpad.net/bugs/1989218
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/scsi/ufs/ufshcd-pltfrm.c