From: "Antonino A. Daplas" <adaplas@hotpop.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Linux Fbdev development list <linux-fbdev-devel@lists.sourceforge.net>
Subject: [PATCH 5/9] fbdev: Check return value of fb_add_videomode
Date: Tue, 21 Dec 2004 23:34:07 +0800 [thread overview]
Message-ID: <20041221213653.328C11A0265@smtp-1.hotpop.com> (raw)
The function fb_add_videomode can fail, check return value.
Signed-off-by: Antonino Daplas <adaplas@pol.net>
---
fbmem.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff -Nru a/drivers/video/fbmem.c b/drivers/video/fbmem.c
--- a/drivers/video/fbmem.c 2004-12-21 22:44:55 +08:00
+++ b/drivers/video/fbmem.c 2004-11-29 20:07:51 +08:00
@@ -716,6 +716,7 @@
if ((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW) {
struct fb_videomode mode;
info->var = *var;
+ int err = 0;
if (info->fbops->fb_set_par)
info->fbops->fb_set_par(info);
@@ -728,15 +729,16 @@
if (info->modelist.prev && info->modelist.next &&
!list_empty(&info->modelist))
- fb_add_videomode(&mode, &info->modelist);
+ err = fb_add_videomode(&mode, &info->modelist);
- if (info->flags & FBINFO_MISC_USEREVENT) {
+ if (!err && info->flags & FBINFO_MISC_USEREVENT) {
struct fb_event event;
info->flags &= ~FBINFO_MISC_USEREVENT;
event.info = info;
notifier_call_chain(&fb_notifier_list,
- FB_EVENT_MODE_CHANGE, &event);
+ FB_EVENT_MODE_CHANGE,
+ &event);
}
}
}
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
reply other threads:[~2004-12-21 21:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20041221213653.328C11A0265@smtp-1.hotpop.com \
--to=adaplas@hotpop.com \
--cc=akpm@osdl.org \
--cc=linux-fbdev-devel@lists.sourceforge.net \
/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;
as well as URLs for NNTP newsgroup(s).