android_kernel_motorola_sm6375/drivers/base
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Dan Carpenter eab11dcd6a pmdomain: core: Fix error checking in genpd_dev_pm_attach_by_id()
[ Upstream commit 0f5757667ec0aaf2456c3b76fcf0c6c3ea3591fe ]

The error checking for of_count_phandle_with_args() does not handle
negative error codes correctly.  The problem is that "index" is a u32 so
in the condition "if (index >= num_domains)" negative error codes stored
in "num_domains" are type promoted to very high positive values and
"index" is always going to be valid.

Test for negative error codes first and then test if "index" is valid.

Fixes: 3ccf3f0cd1 ("PM / Domains: Enable genpd_dev_pm_attach_by_id|name() for single PM domain")
Signed-off-by: Dan Carpenter <[email protected]>
Cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Ulf Hansson <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2025-06-27 11:02:49 +01:00
..
firmware_loader firmware_loader: Block path traversal 2024-11-08 16:20:33 +01:00
power pmdomain: core: Fix error checking in genpd_dev_pm_attach_by_id() 2025-06-27 11:02:49 +01:00
regmap regmap-irq: Add missing kfree() 2025-03-13 12:43:16 +01:00
test driver core: test_async: fix an error code 2023-09-23 10:59:50 +02:00
arch_topology.c
attribute_container.c
base.h
bus.c driver core: bus: Fix double free in driver API bus_register() 2025-03-13 12:43:20 +01:00
cacheinfo.c
class.c
component.c
container.c
core.c Revert "driver core: Fix uevent_show() vs driver detach race" 2024-11-08 16:20:53 +01:00
cpu.c
dd.c driver core: Release all resources during unbind before updating device links 2023-12-08 08:44:22 +01:00
devcon.c
devcoredump.c devcoredump: Send uevent once devcd is ready 2023-12-13 18:18:18 +01:00
devres.c devres: Initialize an uninitialized struct member 2024-09-12 11:03:54 +02:00
devtmpfs.c
driver.c driver: platform: Add helper for safer setting of driver_override 2023-11-08 11:23:39 +01:00
firmware.c
hypervisor.c
init.c
isa.c
Kconfig
Makefile
map.c
memory.c
module.c Revert "driver core: Fix uevent_show() vs driver detach race" 2024-11-08 16:20:53 +01:00
node.c
pinctrl.c
platform-msi.c
platform.c driver: platform: Add helper for safer setting of driver_override 2023-11-08 11:23:39 +01:00
property.c
soc.c
swnode.c software node: Let args be NULL in software_node_get_reference_args 2024-01-25 14:34:31 -08:00
syscore.c
topology.c
transport_class.c