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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <g.liakhovetski@xxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Tourism]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux