public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: "Heikki Krogerus" <heikki.krogerus@linux.intel.com>,
	"Lucas De Marchi" <lucas.demarchi@intel.com>,
	"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Michael J. Ruhl" <michael.j.ruhl@intel.com>,
	"Andi Shyti" <andi.shyti@linux.intel.com>,
	intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH next] drm/xe: Fix a NULL vs IS_ERR() bug in xe_i2c_register_adapter()
Date: Wed, 16 Jul 2025 10:50:38 -0400	[thread overview]
Message-ID: <aHe8PhkKYnP3izvV@intel.com> (raw)
In-Reply-To: <65825d00-81ab-4665-af51-4fff6786a250@sabinyo.mountain>

On Tue, Jul 15, 2025 at 05:59:44PM -0500, Dan Carpenter wrote:
> The fwnode_create_software_node() function returns error pointers.  It
> never returns NULL.  Update the checks to match.
> 
> Fixes: f0e53aadd702 ("drm/xe: Support for I2C attached MCUs")

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

and pushing soon

> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
>  drivers/gpu/drm/xe/xe_i2c.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_i2c.c b/drivers/gpu/drm/xe/xe_i2c.c
> index db9c0340be5c..1f19718db559 100644
> --- a/drivers/gpu/drm/xe/xe_i2c.c
> +++ b/drivers/gpu/drm/xe/xe_i2c.c
> @@ -96,8 +96,8 @@ static int xe_i2c_register_adapter(struct xe_i2c *i2c)
>  	int ret;
>  
>  	fwnode = fwnode_create_software_node(xe_i2c_adapter_properties, NULL);
> -	if (!fwnode)
> -		return -ENOMEM;
> +	if (IS_ERR(fwnode))
> +		return PTR_ERR(fwnode);
>  
>  	/*
>  	 * Not using platform_device_register_full() here because we don't have
> -- 
> 2.47.2
> 

      reply	other threads:[~2025-07-16 14:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-15 22:59 [PATCH next] drm/xe: Fix a NULL vs IS_ERR() bug in xe_i2c_register_adapter() Dan Carpenter
2025-07-16 14:50 ` Rodrigo Vivi [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=aHe8PhkKYnP3izvV@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=airlied@gmail.com \
    --cc=andi.shyti@linux.intel.com \
    --cc=dan.carpenter@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucas.demarchi@intel.com \
    --cc=michael.j.ruhl@intel.com \
    --cc=simona@ffwll.ch \
    --cc=thomas.hellstrom@linux.intel.com \
    /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