maru_camera: Bug fix 54/27154/1
authorjinhyung.jo <jinhyung.jo@samsung.com>
Tue, 19 Aug 2014 08:16:33 +0000 (17:16 +0900)
committerjinhyung.jo <jinhyung.jo@samsung.com>
Fri, 5 Sep 2014 09:30:32 +0000 (18:30 +0900)
missing fd close on error condition

Change-Id: I9146550121654de8c70846edebcbd67690eac364
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
tizen/src/hw/pci/maru_camera_linux_pci.c

index c4e1340..2b79a0e 100644 (file)
@@ -859,6 +859,8 @@ void marucam_device_open(MaruCamState *state)
           "errstr(%s)\n", dst_fmt.fmt.pix.pixelformat, dst_fmt.fmt.pix.width,
           dst_fmt.fmt.pix.height, strerror(errno));
         param->errCode = errno;
+        v4l2_close(v4l2_fd);
+        v4l2_fd = -1;
         return;
     }
     TRACE("Set the default format: w:h(%dx%d), fmt(0x%x), size(%d), "