[PATCH] fbdev: bail out immediately, if driver's fb_open fails

DORMANTno replies

From: Guennadi Liakhovetski <hidden>
Date: 2010-09-03 07:52:00
Subsystem: framebuffer layer, the rest · Maintainers: Helge Deller, Linus Torvalds

If driver specific fb_open fails no need to continue the function and call
fb_deferred_io_open(), bail out immediately.

Signed-off-by: Guennadi Liakhovetski <redacted>
---
 drivers/video/fbmem.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index b066475..adcf655 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1395,8 +1395,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)
-- 
1.7.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help