]> git.baikalelectronics.ru Git - uboot.git/commit
power-domain: Fix use of uninitialized value in dev_power_domain_ctrl
authorSean Anderson <seanga2@gmail.com>
Wed, 23 Mar 2022 18:26:09 +0000 (14:26 -0400)
committerJaehoon Chung <jh80.chung@samsung.com>
Fri, 22 Apr 2022 12:19:21 +0000 (21:19 +0900)
commitabfb4dee5210bb8c73052f6f5fd2e22ea5594286
treed7f1764f867b41852cd57a3a6e15166faae5b3f5
parent68a69cfea370e78e13e442e3f1e33dd1c1fc673e
power-domain: Fix use of uninitialized value in dev_power_domain_ctrl

If dev_count_phandle_with_args returns 0 or another error, then pd will never
have been initialized by power_domain_get_by_index. Avoid comparing against
pd.dev in this situation.

Fixes: efbabe6645 ("power-domain: fix hang in endless loop on i.MX8")
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
drivers/power/domain/power-domain-uclass.c