lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1ccfeed2-0c52-4a5b-a7cf-3240a39ef3d3@nvidia.com>
Date: Tue, 2 Sep 2025 11:48:25 +0200
From: Nirmoy Das <nirmoyd@...dia.com>
To: Dan Carpenter <dan.carpenter@...aro.org>, Ben Skeggs <bskeggs@...hat.com>
CC: Lyude Paul <lyude@...hat.com>, Danilo Krummrich <dakr@...nel.org>, "David
 Airlie" <airlied@...il.com>, Simona Vetter <simona@...ll.ch>, Gourav Samaiya
	<gsamaiya@...dia.com>, <dri-devel@...ts.freedesktop.org>,
	<nouveau@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>,
	<kernel-janitors@...r.kernel.org>
Subject: Re: [PATCH] drm/nouveau/acr/ga102: fix NULL vs IS_ERR() check in
 ga102_acr_wpr_parse()


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@...aro.org>
Reviewed-by: Nirmoy Das <nirmoyd@...dia.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;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ