From: Dan Carpenter <dan.carpenter@linaro.org>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Javier Martinez Canillas <javierm@redhat.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [PATCH next] drm/sysfb: Fix a NULL vs IS_ERR() bug
Date: Fri, 17 Oct 2025 19:03:33 +0300 [thread overview]
Message-ID: <aPJo1W5Dl4rmGX_P@stanley.mountain> (raw)
The drm_atomic_get_crtc_state() function never returns NULL, it returns
error pointers. Update the error checking to match.
Fixes: cb71de092553 ("drm/sysfb: Lookup blit function during atomic check")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/gpu/drm/sysfb/drm_sysfb_modeset.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/sysfb/drm_sysfb_modeset.c b/drivers/gpu/drm/sysfb/drm_sysfb_modeset.c
index 8517c490e815..d2c4d8f3d4d0 100644
--- a/drivers/gpu/drm/sysfb/drm_sysfb_modeset.c
+++ b/drivers/gpu/drm/sysfb/drm_sysfb_modeset.c
@@ -259,7 +259,7 @@ int drm_sysfb_plane_helper_begin_fb_access(struct drm_plane *plane,
ret = -EINVAL;
crtc_state = drm_atomic_get_crtc_state(plane_state->state, plane_state->crtc);
- if (drm_WARN_ON_ONCE(dev, !crtc_state))
+ if (drm_WARN_ON_ONCE(dev, IS_ERR(crtc_state)))
goto err_drm_gem_end_shadow_fb_access;
sysfb_crtc_state = to_drm_sysfb_crtc_state(crtc_state);
--
2.51.0
next reply other threads:[~2025-10-17 16:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-17 16:03 Dan Carpenter [this message]
2025-10-17 16:15 ` [PATCH next] drm/sysfb: Fix a NULL vs IS_ERR() bug Ville Syrjälä
2025-10-17 16:42 ` Dan Carpenter
[not found] ` <d8780a77-a888-4038-babc-6c78956f5bbf@suse.de>
2025-10-19 15:06 ` Thomas Zimmermann
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=aPJo1W5Dl4rmGX_P@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/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.