| bbc31108 | 26-Sep-2025 |
Dan Carpenter <dan.carpenter@linaro.org> |
pmdomain: thead: Fix error pointer vs NULL bug in th1520_pd_reboot_init()
The devm_auxiliary_device_create() returns NULL on error. It never returns error pointers. Using PTR_ERR_OR_ZERO() here me
pmdomain: thead: Fix error pointer vs NULL bug in th1520_pd_reboot_init()
The devm_auxiliary_device_create() returns NULL on error. It never returns error pointers. Using PTR_ERR_OR_ZERO() here means the function always returns success. Replace the PTR_ERR_OR_ZERO() call check with a NULL check.
Fixes: 64581f41f4c4 ("pmdomain: thead: create auxiliary device for rebooting") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Acked-by: Icenowy Zheng <uwu@icenowy.me> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
show more ...
|
| 6ec7c4a2 | 14-Mar-2025 |
Arnd Bergmann <arnd@arndb.de> |
pmdomain: thead: fix TH1520_AON_PROTOCOL dependency
Kconfig treats the dependency as optional, but the header file only provides normal declarations and no empty API stubs:
ld: fs/btrfs/extent_io.o
pmdomain: thead: fix TH1520_AON_PROTOCOL dependency
Kconfig treats the dependency as optional, but the header file only provides normal declarations and no empty API stubs:
ld: fs/btrfs/extent_io.o: in function `writepage_delalloc': extent_io.c:(.text+0x2b42): undefined reference to `__udivdi3' ld: drivers/pmdomain/thead/th1520-pm-domains.o: in function `th1520_pd_power_off': th1520-pm-domains.c:(.text+0x57): undefined reference to `th1520_aon_power_update' ld: drivers/pmdomain/thead/th1520-pm-domains.o: in function `th1520_pd_power_on': th1520-pm-domains.c:(.text+0x8a): undefined reference to `th1520_aon_power_update' ld: drivers/pmdomain/thead/th1520-pm-domains.o: in function `th1520_pd_probe': th1520-pm-domains.c:(.text+0xb8): undefined reference to `th1520_aon_init' ld: th1520-pm-domains.c:(.text+0x1c6): undefined reference to `th1520_aon_power_update'
Since the firmware code can easily be enabled for compile testing, there is no need to add stubs either, so just make it a hard dependency.
Fixes: dc9a897dbb03 ("pmdomain: thead: Add power-domain driver for TH1520") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Michal Wilczynski <m.wilczynski@samsung.com> Link: https://lore.kernel.org/r/20250314154834.4053416-1-arnd@kernel.org Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
show more ...
|