From patchwork Fri Jun 9 15:33:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liam Girdwood X-Patchwork-Id: 9778833 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 11C0F60350 for ; Fri, 9 Jun 2017 15:34:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E758E285A5 for ; Fri, 9 Jun 2017 15:34:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DBA3F285FE; Fri, 9 Jun 2017 15:34:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E9A0285A5 for ; Fri, 9 Jun 2017 15:34:01 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 5FAB4267684; Fri, 9 Jun 2017 17:34:00 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 76DDF267689; Fri, 9 Jun 2017 17:33:59 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by alsa0.perex.cz (Postfix) with ESMTP id 3EA44266AB2 for ; Fri, 9 Jun 2017 17:33:55 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jun 2017 08:33:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.39,317,1493708400"; d="scan'208"; a="1139662117" Received: from cmodonov-mobl.ger.corp.intel.com (HELO loki.ger.corp.intel.com) ([10.252.22.20]) by orsmga001.jf.intel.com with ESMTP; 09 Jun 2017 08:33:52 -0700 From: Liam Girdwood To: Takashi Iwai Date: Fri, 9 Jun 2017 16:33:42 +0100 Message-Id: <1497022422-5974-1-git-send-email-liam.r.girdwood@linux.intel.com> X-Mailer: git-send-email 1.9.1 Cc: Liam Girdwood , alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH] topology: delete output file if parsing fails. X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Currently the binary output file is left when parsing fails. This confuses GNU Make if the parsing fails and causes the compilation to partially complete. Signed-off-by: Liam Girdwood --- topology/topology.c | 1 + 1 file changed, 1 insertion(+) diff --git a/topology/topology.c b/topology/topology.c index 6d876ee..097c255 100644 --- a/topology/topology.c +++ b/topology/topology.c @@ -108,6 +108,7 @@ int main(int argc, char *argv[]) if (err < 0) { fprintf(stderr, _("failed to compile context %s\n"), source_file); snd_tplg_free(snd_tplg); + unlink(output_file); return 1; }