aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power/sequencing/core.c
Commit message (Collapse)AuthorAgeFilesLines
* power: sequencing: fix an invalid pointer dereference in error pathBartosz Golaszewski2024-07-171-1/+2
| | | | | | | | | | | | | | We may end up calling pwrseq_target_free() on a partially initialized target object whose unit is either NULL or an ERR_PTR(). Avoid dereferencing invalid memory by adding an appropriate check to pwrseq_target_free(). Fixes: 249ebf3f65f8 ("power: sequencing: implement the pwrseq core") Reported-by: Dan Carpenter <[email protected]> Closes: https://lore.kernel.org/linux-pm/[email protected]/ Reviewed-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bartosz Golaszewski <[email protected]>
* power: sequencing: simplify returning pointer without cleanupKrzysztof Kozlowski2024-07-031-1/+1
| | | | | | | | | Use 'return_ptr' helper for returning a pointer without cleanup for shorter code. Signed-off-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bartosz Golaszewski <[email protected]>
* power: sequencing: implement the pwrseq coreBartosz Golaszewski2024-06-121-0/+1105
Implement the power sequencing subsystem allowing devices to share complex powering-up and down procedures. It's split into the consumer and provider parts but does not implement any new DT bindings so that the actual power sequencing is never revealed in the DT representation. Tested-by: Amit Pundir <[email protected]> Tested-by: Neil Armstrong <[email protected]> # on SM8550-QRD, SM8650-QRD & SM8650-HDK Tested-by: Caleb Connolly <[email protected]> # OnePlus 8T Acked-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bartosz Golaszewski <[email protected]>