From patchwork Sun Mar 15 17:28:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 450322 X-Patchwork-Delegate: l.majewski@samsung.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id B69DB1400A0 for ; Mon, 16 Mar 2015 04:28:49 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C2B404B66F; Sun, 15 Mar 2015 18:28:42 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9mwNNZXyNqwW; Sun, 15 Mar 2015 18:28:42 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 288214B652; Sun, 15 Mar 2015 18:28:42 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EC4D14B64D for ; Sun, 15 Mar 2015 18:28:39 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sK3oLsSL3E24 for ; Sun, 15 Mar 2015 18:28:39 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from gagarine.paulk.fr (gagarine.paulk.fr [109.190.93.129]) by theia.denx.de (Postfix) with ESMTPS id B05874B61F for ; Sun, 15 Mar 2015 18:28:39 +0100 (CET) Received: by gagarine.paulk.fr (Postfix, from userid 65534) id 2064F20AAC; Sun, 15 Mar 2015 18:28:39 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on gagarine.paulk.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from armstrong.paulk.fr (armstrong.paulk.fr [82.233.88.171]) by gagarine.paulk.fr (Postfix) with ESMTPS id 3C12820AA3; Sun, 15 Mar 2015 18:28:38 +0100 (CET) Received: from localhost.localdomain (aldrin [192.168.0.128]) by armstrong.paulk.fr (Postfix) with ESMTP id 7D20C3762D; Sun, 15 Mar 2015 18:28:37 +0100 (CET) From: Paul Kocialkowski To: u-boot@lists.denx.de Date: Sun, 15 Mar 2015 18:28:35 +0100 Message-Id: <1426440515-4577-1-git-send-email-contact@paulk.fr> X-Mailer: git-send-email 1.9.1 Cc: Marek Vasut Subject: [U-Boot] [PATCH] fastboot: Proper download gadget unregister and clear when cable is missing X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Signed-off-by: Paul Kocialkowski --- common/cmd_fastboot.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c index 346ab80..7956a5b 100644 --- a/common/cmd_fastboot.c +++ b/common/cmd_fastboot.c @@ -23,6 +23,8 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) if (!g_dnl_board_usb_cable_connected()) { puts("\rUSB cable not detected.\n" \ "Command exit.\n"); + g_dnl_unregister(); + g_dnl_clear_detach(); return CMD_RET_FAILURE; }