[PATCH 03/12] libusbg: Fix gadget-acm-ecm example to cleanup at exit.

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

 



Make use of previously unused variable ret to cleanup
afterr successful gadget creation.

Signed-off-by: Krzysztof Opasiak <k.opasiak@xxxxxxxxxxx>
---
 examples/gadget-acm-ecm.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/gadget-acm-ecm.c b/examples/gadget-acm-ecm.c
index e33ee06..49fe172 100644
--- a/examples/gadget-acm-ecm.c
+++ b/examples/gadget-acm-ecm.c
@@ -81,11 +81,11 @@ int main(void)
 
 	gadget_enable_gadget(g, DEFAULT_UDC);
 
-	return 0;
+	ret = 0;
 
 error2:
 	gadget_cleanup(s);
 
 error1:
-	return -EINVAL;
+	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