mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nirmoy Das <nirmoyd@nvidia.com>
To: Dan Carpenter <dan.carpenter@linaro.org>,
	Ben Skeggs <bskeggs@redhat.com>
Cc: Lyude Paul <lyude@redhat.com>, Danilo Krummrich <dakr@kernel.org>,
	"David Airlie" <airlied@gmail.com>,
	Simona Vetter <simona@ffwll.ch>,
	Gourav Samaiya <gsamaiya@nvidia.com>,
	<dri-devel@lists.freedesktop.org>,
	<nouveau@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
	<kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH] drm/nouveau/acr/ga102: fix NULL vs IS_ERR() check in ga102_acr_wpr_parse()
Date: Tue, 2 Sep 2025 11:48:25 +0200	[thread overview]
Message-ID: <1ccfeed2-0c52-4a5b-a7cf-3240a39ef3d3@nvidia.com> (raw)
In-Reply-To: <aLaQO-dpTsHJ-oH9@stanley.mountain>


On 02.09.25 08:35, Dan Carpenter wrote:
> The nvkm_acr_lsfw_add() function never returns NULL, it returns error
> pointers.  Update the check to match.
>
> Fixes: 4b569ded09fd ("drm/nouveau/acr/ga102: initial support")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Nirmoy Das <nirmoyd@nvidia.com>
> ---
>   drivers/gpu/drm/nouveau/nvkm/subdev/acr/ga102.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/acr/ga102.c b/drivers/gpu/drm/nouveau/nvkm/subdev/acr/ga102.c
> index c7d38609bb7e..aae96a94acee 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/acr/ga102.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/acr/ga102.c
> @@ -218,11 +218,13 @@ static int
>   ga102_acr_wpr_parse(struct nvkm_acr *acr)
>   {
>   	const struct wpr_header_v2 *hdr = (void *)acr->wpr_fw->data;
> +	struct nvkm_acr_lsfw *lsfw;
>   
>   	while (hdr->wpr.falcon_id != WPR_HEADER_V1_FALCON_ID_INVALID) {
>   		wpr_header_v2_dump(&acr->subdev, hdr);
> -		if (!nvkm_acr_lsfw_add(NULL, acr, NULL, (hdr++)->wpr.falcon_id))
> -			return -ENOMEM;
> +		lsfw = nvkm_acr_lsfw_add(NULL, acr, NULL, (hdr++)->wpr.falcon_id);
> +		if (IS_ERR(lsfw))
> +			return PTR_ERR(lsfw);
>   	}
>   
>   	return 0;

      reply	other threads:[~2025-09-02  9:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-02  6:35 Dan Carpenter
2025-09-02  9:48 ` Nirmoy Das [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=1ccfeed2-0c52-4a5b-a7cf-3240a39ef3d3@nvidia.com \
    --to=nirmoyd@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=bskeggs@redhat.com \
    --cc=dakr@kernel.org \
    --cc=dan.carpenter@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gsamaiya@nvidia.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lyude@redhat.com \
    --cc=nouveau@lists.freedesktop.org \
    --cc=simona@ffwll.ch \
    /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

all inboxes | Powered by JetHome®