From: Nirmoy Das <nirmoy.das@intel.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: intel-gfx@lists.freedesktop.org, kernel-janitors@vger.kernel.org,
Suren Baghdasaryan <surenb@google.com>,
Matthew Auld <matthew.auld@intel.com>,
Daniel Vetter <daniel@ffwll.ch>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
David Airlie <airlied@gmail.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Fix a NULL vs IS_ERR() bug
Date: Tue, 6 Jun 2023 10:51:51 +0200 [thread overview]
Message-ID: <0533e8a5-9719-ea26-8971-49d7c00d6ed9@intel.com> (raw)
In-Reply-To: <ZH7tHLRZ9oBjedjN@moroto>
On 6/6/2023 10:23 AM, Dan Carpenter wrote:
> The mmap_offset_attach() function returns error pointers, it doesn't
> return NULL.
>
> Fixes: eaee1c085863 ("drm/i915: Add a function to mmap framebuffer obj")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
Thanks,
Nirmoy
> ---
> drivers/gpu/drm/i915/gem/i915_gem_mman.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> index 4e7a838ab7bd..aa4d842d4c5a 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> @@ -1085,8 +1085,8 @@ int i915_gem_fb_mmap(struct drm_i915_gem_object *obj, struct vm_area_struct *vma
> /* handle stolen and smem objects */
> mmap_type = i915_ggtt_has_aperture(ggtt) ? I915_MMAP_TYPE_GTT : I915_MMAP_TYPE_WC;
> mmo = mmap_offset_attach(obj, mmap_type, NULL);
> - if (!mmo)
> - return -ENODEV;
> + if (IS_ERR(mmo))
> + return PTR_ERR(mmo);
> }
>
> /*
next prev parent reply other threads:[~2023-06-06 8:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-06 8:23 [Intel-gfx] [PATCH] drm/i915: Fix a NULL vs IS_ERR() bug Dan Carpenter
2023-06-06 8:51 ` Nirmoy Das [this message]
2023-06-06 9:22 ` Andi Shyti
2023-06-19 14:06 ` Nirmoy Das
2023-06-06 12:23 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2023-06-07 2:25 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
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=0533e8a5-9719-ea26-8971-49d7c00d6ed9@intel.com \
--to=nirmoy.das@intel.com \
--cc=airlied@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=matthew.auld@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=surenb@google.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