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