linux/drivers/interconnect
Kuan-Wei Chiu 6bfe104fd0 interconnect: debugfs: Fix incorrect error handling for NULL path
The icc_commit_set() function, used by the debugfs interface, checks
the validity of the global cur_path pointer using IS_ERR_OR_NULL().
However, in the specific case where cur_path is NULL, while
IS_ERR_OR_NULL(NULL) correctly evaluates to true, the subsequent call
to PTR_ERR(NULL) returns 0.

This causes the function to return a success code (0) instead of an
error, misleading the user into believing their bandwidth request was
successfully committed when, in fact, no operation was performed.

Fix this by adding an explicit check to return -EINVAL if cur_path is
NULL. This prevents silent failures and ensures that an invalid
operational sequence is immediately and clearly reported as an error.

Fixes: 770c69f037 ("interconnect: Add debugfs test client")
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Link: https://lore.kernel.org/r/20251010151447.2289779-1-visitorckw@gmail.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2025-10-31 02:53:58 +02:00
..
imx interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
mediatek interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
qcom interconnect: qcom: add glymur interconnect provider driver 2025-08-18 13:43:18 +03:00
samsung interconnect: exynos: handle node name allocation failure 2025-06-23 17:59:09 +03:00
bulk.c interconnect: add device managed bulk API 2022-07-04 16:14:29 +03:00
core.c interconnect: core: Use device_match_of_node() 2025-09-12 13:53:12 +03:00
debugfs-client.c interconnect: debugfs: Fix incorrect error handling for NULL path 2025-10-31 02:53:58 +02:00
icc-clk.c interconnect: icc-clk: destroy nodes in case of memory allocation failures 2025-06-26 19:18:01 +03:00
internal.h Merge branch 'icc-debugfs' into icc-next 2023-08-22 21:05:09 +03:00
Kconfig interconnect: mediatek: Add MediaTek MT8183/8195 EMI Interconnect driver 2024-06-13 14:31:43 +03:00
Makefile interconnect: mediatek: Add MediaTek MT8183/8195 EMI Interconnect driver 2024-06-13 14:31:43 +03:00
trace.h tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00