From f52a228eefc0c935f0d107095391a1ce9c52f8d9 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 8 Sep 2015 07:46:48 -0600 Subject: [PATCH] Eliminate a warning --- system/composite/composite_main.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/system/composite/composite_main.c b/system/composite/composite_main.c index 4d5122ef0..a31c60079 100644 --- a/system/composite/composite_main.c +++ b/system/composite/composite_main.c @@ -1,7 +1,7 @@ /**************************************************************************** * system/composite/composite_main.c * - * Copyright (C) 2012-2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -706,7 +706,6 @@ int conn_main(int argc, char *argv[]) */ #ifdef CONFIG_NSH_BUILTIN_APPS - /* Check if there is a non-NULL USB mass storage device handle (meaning that the * USB mass storage device is already configured). */ @@ -760,7 +759,7 @@ int conn_main(int argc, char *argv[]) ret = dumptrace(); if (ret < 0) { - goto errout; + goto errout_bad_dump; } #endif @@ -831,11 +830,16 @@ int conn_main(int argc, char *argv[]) final_memory_usage("Final memory usage"); return 0; -errout: +#if defined(CONFIG_USBDEV_TRACE) && CONFIG_USBDEV_TRACE_INITIALIDSET != 0 +errout_bad_dump: +#endif + #if !defined(CONFIG_NSH_BUILTIN_APPS) && !defined(CONFIG_DISABLE_SIGNALS) +errout: close(g_composite.infd); close(g_composite.outfd); #endif + composite_uninitialize(g_composite.cmphandle); final_memory_usage("Final memory usage"); return 1;