public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kuan-Wei Chiu <visitorckw@gmail.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Cc: Georgi Djakov <djakov@kernel.org>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] interconnect: Do not create empty devres on missing interconnects
Date: Fri, 17 Apr 2026 00:37:54 +0800	[thread overview]
Message-ID: <aeEQYg3fTj-n0JDR@google.com> (raw)
In-Reply-To: <20260416130912.375013-2-krzysztof.kozlowski@oss.qualcomm.com>

On Thu, Apr 16, 2026 at 03:09:13PM +0200, Krzysztof Kozlowski wrote:
> 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>

Regards,
Kuan-Wei

> ---
>  drivers/interconnect/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c
> index 8569b78a1851..ce572c62f58f 100644
> --- a/drivers/interconnect/core.c
> +++ b/drivers/interconnect/core.c
> @@ -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 {
> -- 
> 2.51.0
> 
> 

      reply	other threads:[~2026-04-16 16:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-16 13:09 [PATCH] interconnect: Do not create empty devres on missing interconnects Krzysztof Kozlowski
2026-04-16 16:37 ` Kuan-Wei Chiu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aeEQYg3fTj-n0JDR@google.com \
    --to=visitorckw@gmail.com \
    --cc=djakov@kernel.org \
    --cc=krzysztof.kozlowski@oss.qualcomm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox