From: "'Max Staudt" <mstaudt@suse.de>
To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: mstaudt@suse.de, eich@suse.de, tiwai@suse.de,
thellstrom@vmware.com, tomi.valkeinen@ti.com
Subject: [PATCH 1/3] Add missing "goto out" after fbops->fb_open()
Date: Mon, 23 May 2016 12:48:51 +0200 [thread overview]
Message-ID: <1464000533-13140-2-git-send-email-mstaudt@suse.de> (raw)
In-Reply-To: <1464000533-13140-1-git-send-email-mstaudt@suse.de>
From: Max Staudt <mstaudt@suse.de>
It doesn't make sense to execute any further actions after a failed
call to fbops->fb_open().
Signed-off-by: Max Staudt <mstaudt@suse.de>
---
drivers/video/fbdev/core/fbmem.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
index 76c1ad9..913c496 100644
--- a/drivers/video/fbdev/core/fbmem.c
+++ b/drivers/video/fbdev/core/fbmem.c
@@ -1462,8 +1462,10 @@ __releases(&info->lock)
file->private_data = info;
if (info->fbops->fb_open) {
res = info->fbops->fb_open(info,1);
- if (res)
+ if (res) {
module_put(info->fbops->owner);
+ goto out;
+ }
}
#ifdef CONFIG_FB_DEFERRED_IO
if (info->fbdefio)
--
2.6.6
next prev parent reply other threads:[~2016-05-23 10:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-23 10:48 [PATCH 0/3] Fix kernel WARNING in TTM/Bochs KMS driver 'Max Staudt
2016-05-23 10:48 ` 'Max Staudt [this message]
2016-05-23 10:48 ` [PATCH 2/3] Define fb_open_adj_file() 'Max Staudt
2016-05-23 13:44 ` Daniel Vetter
2016-05-24 16:28 ` Max Staudt
2016-05-24 16:51 ` Daniel Vetter
2016-05-25 16:06 ` Max Staudt
2016-05-23 10:48 ` [PATCH 3/3] Add fb_open_adj_file() to bochsdrmfb to avoid use-after-free 'Max Staudt
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=1464000533-13140-2-git-send-email-mstaudt@suse.de \
--to=mstaudt@suse.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=eich@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=thellstrom@vmware.com \
--cc=tiwai@suse.de \
--cc=tomi.valkeinen@ti.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