[PATCH 1/4] closing uvc file when init fails

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

 



This patch adds uvc device file closing when inits in uvc_open() function fails.

Signed-off-by: Robert Baldyga <r.baldyga@xxxxxxxxxxx>
---
 uvc-gadget.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/uvc-gadget.c b/uvc-gadget.c
index 0764838..5512e2c 100644
--- a/uvc-gadget.c
+++ b/uvc-gadget.c
@@ -880,6 +880,7 @@ uvc_open(struct uvc_device **uvc, char *devname)
 	return 0;
 
 err:
+	close(fd);
 	return ret;
 }
 
-- 
1.7.9.5

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




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux