mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 11:37:06 +02:00
interconnect: Do not create empty devres on missing interconnects
of_icc_get() returns NULL on valid case - no interconnects - but no need to create devres for that, because it just wastes memory without any use/benefits. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Reviewed-by: Kuan-Wei Chiu <visitorckw@gmail.com> Link: https://patch.msgid.link/20260416130912.375013-2-krzysztof.kozlowski@oss.qualcomm.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
This commit is contained in:
parent
254f49634e
commit
7562778563
|
|
@ -432,7 +432,7 @@ struct icc_path *devm_of_icc_get(struct device *dev, const char *name)
|
|||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
path = of_icc_get(dev, name);
|
||||
if (!IS_ERR(path)) {
|
||||
if (!IS_ERR_OR_NULL(path)) {
|
||||
*ptr = path;
|
||||
devres_add(dev, ptr);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user