]> git.dujemihanovic.xyz Git - u-boot.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)
commit847990219c04fe4d4b69deefdd29a2fb2d8171d9
treed7f1764f867b41852cd57a3a6e15166faae5b3f5
parentea5583b90f9c162af6f2025718dc50ffbb6e4552
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: 3e4fcfa4bc ("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