From: Javier Martinez Canillas <javierm@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: "Noralf Trønnes" <noralf@tronnes.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"Maxime Ripard" <mripard@kernel.org>,
"Javier Martinez Canillas" <javierm@redhat.com>,
"Daniel Vetter" <daniel@ffwll.ch>,
"David Airlie" <airlied@gmail.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
dri-devel@lists.freedesktop.org
Subject: [PATCH 2/3] drm/fb-helper: Check fb_deferred_io_init() return value
Date: Fri, 20 Jan 2023 13:08:21 +0100 [thread overview]
Message-ID: <20230120120822.2536032-3-javierm@redhat.com> (raw)
In-Reply-To: <20230120120822.2536032-1-javierm@redhat.com>
The fb_deferred_io_init() can fail and return an errno code but currently
there is no check for its return value.
Fix that and propagate to errno to the caller in the case of a failure.
Fixes: d536540f304c ("drm/fb-helper: Add generic fbdev emulation .fb_probe function")
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
drivers/gpu/drm/drm_fbdev_generic.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_fbdev_generic.c b/drivers/gpu/drm/drm_fbdev_generic.c
index 0a4c160e0e58..b2df8c03594c 100644
--- a/drivers/gpu/drm/drm_fbdev_generic.c
+++ b/drivers/gpu/drm/drm_fbdev_generic.c
@@ -223,7 +223,9 @@ static int drm_fbdev_fb_probe(struct drm_fb_helper *fb_helper,
fbi->flags |= FBINFO_VIRTFB | FBINFO_READS_FAST;
fbi->fbdefio = &drm_fbdev_defio;
- fb_deferred_io_init(fbi);
+ ret = fb_deferred_io_init(fbi);
+ if (ret)
+ return ret;
} else {
/* buffer is mapped for HW framebuffer */
ret = drm_client_buffer_vmap(fb_helper->buffer, &map);
--
2.39.0
next prev parent reply other threads:[~2023-01-20 12:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-20 12:08 [PATCH 0/3] Fixes and cleanup for DRM fbdev emulation and deferred I/O Javier Martinez Canillas
2023-01-20 12:08 ` [PATCH 1/3] fbdev: Remove unused struct fb_deferred_io .first_io field Javier Martinez Canillas
2023-01-20 12:17 ` Thomas Zimmermann
2023-01-20 12:08 ` Javier Martinez Canillas [this message]
2023-01-20 12:20 ` [PATCH 2/3] drm/fb-helper: Check fb_deferred_io_init() return value Thomas Zimmermann
2023-01-20 12:08 ` [PATCH 3/3] drm/fb-helper: Use a per-driver FB deferred I/O handler Javier Martinez Canillas
2023-01-21 4:00 ` kernel test robot
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=20230120120822.2536032-3-javierm@redhat.com \
--to=javierm@redhat.com \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=noralf@tronnes.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome