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

Started by Guennadi Liakhovetski on Sep 3, 2010

Subsystems (2)

Maintainers (2)

DORMANTno replies

open the first message on its own page

Message details and related content
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 / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help