From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: "Piotr Piórkowski" <piotr.piorkowski@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>,
"Matthew Brost" <matthew.brost@intel.com>,
"Matthew Auld" <matthew.auld@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 an IS_ERR() vs NULL bug in xe_tile_alloc_vram()
Date: Mon, 21 Jul 2025 10:40:01 -0400 [thread overview]
Message-ID: <aH5RQTOMVdQrv-a7@intel.com> (raw)
In-Reply-To: <5449065e-9758-4711-b706-78771c0753c4@sabinyo.mountain>
On Fri, Jul 18, 2025 at 04:23:05PM -0500, Dan Carpenter wrote:
> The xe_vram_region_alloc() function returns NULL on error. It never
> returns error pointers. Update the error checking to match.
>
> Fixes: 4b0a5f5ce784 ("drm/xe: Unify the initialization of VRAM regions")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
> drivers/gpu/drm/xe/xe_tile.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_tile.c b/drivers/gpu/drm/xe/xe_tile.c
> index 0be0a5c57ef4..d49ba3401963 100644
> --- a/drivers/gpu/drm/xe/xe_tile.c
> +++ b/drivers/gpu/drm/xe/xe_tile.c
> @@ -120,8 +120,8 @@ int xe_tile_alloc_vram(struct xe_tile *tile)
> return 0;
>
> vram = xe_vram_region_alloc(xe, tile->id, XE_PL_VRAM0 + tile->id);
> - if (IS_ERR(vram))
> - return PTR_ERR(vram);
> + if (!vram)
> + return -ENOMEM;
Indeed correct, from the drmm_kmalloc to the probe where it is consumed.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
and pushed to drm-xe-next
> tile->mem.vram = vram;
>
> return 0;
> --
> 2.47.2
>
prev parent reply other threads:[~2025-07-21 14:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-18 21:23 [PATCH next] drm/xe: Fix an IS_ERR() vs NULL bug in xe_tile_alloc_vram() Dan Carpenter
2025-07-18 21:42 ` ✓ CI.KUnit: success for " Patchwork
2025-07-18 22:15 ` ✓ Xe.CI.BAT: " Patchwork
2025-07-21 13:12 ` ✗ Xe.CI.Full: failure " Patchwork
2025-07-21 14:40 ` 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=aH5RQTOMVdQrv-a7@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=airlied@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lucas.demarchi@intel.com \
--cc=matthew.auld@intel.com \
--cc=matthew.brost@intel.com \
--cc=piotr.piorkowski@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.