From patchwork Mon Apr 27 16:48:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Haslam X-Patchwork-Id: 47635 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CE9682121F for ; Mon, 27 Apr 2015 16:48:18 +0000 (UTC) Received: by lbbqq2 with SMTP id qq2sf26731386lbb.0 for ; Mon, 27 Apr 2015 09:48:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=DyYjRnkHyOdSEsRCsEIQ1Cw/kTQC+16ExVjJ8qMBmkI=; b=FEQC3D9tpdz7ld/4Al5NOBQsigUaWar1AkeVqSG1QModIoccxNuKS5LtDg3WbZmPIY RCblabDXsB3SVIMP97I0Gq6MPYkQoKdiVZuidbbF+3nWMMMXfH1ITFC0sY7TTFN8EqYI oQO5NU0GCUxZBbN4/yIlaw1THg7c2NWtHdMicte9nTR0+R0rmvQhrJxubxjyu7P1M9Gy EORVJu7G1DW0wElXBxfnxYYdDNuG/qX13kbY+anFMG5NJWemnkbV7bJozgPI/QdjIUj+ MnIVzuQZ2NZXHhy4H6TPaFxAcWE61EwT8GwDklM2PdqtkIW9KlgvP0oj3Cu6nxy9+P1J xcWQ== X-Gm-Message-State: ALoCoQmG8glnVVRlzssaOLkzZ3HuE3A4G2UhYxMsa3G+L7DZHlVH2CYiKDLelzW3Ldlz+hjS8046 X-Received: by 10.194.47.179 with SMTP id e19mr7884443wjn.4.1430153297526; Mon, 27 Apr 2015 09:48:17 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.227 with SMTP id t3ls791422laj.72.gmail; Mon, 27 Apr 2015 09:48:17 -0700 (PDT) X-Received: by 10.152.116.49 with SMTP id jt17mr10818725lab.82.1430153297202; Mon, 27 Apr 2015 09:48:17 -0700 (PDT) Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com. [209.85.217.171]) by mx.google.com with ESMTPS id wc1si9898009lbb.66.2015.04.27.09.48.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Apr 2015 09:48:17 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) client-ip=209.85.217.171; Received: by lbbuc2 with SMTP id uc2so86867507lbb.2 for ; Mon, 27 Apr 2015 09:48:17 -0700 (PDT) X-Received: by 10.112.219.70 with SMTP id pm6mr10665113lbc.41.1430153296907; Mon, 27 Apr 2015 09:48:16 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.67.65 with SMTP id l1csp1388614lbt; Mon, 27 Apr 2015 09:48:16 -0700 (PDT) X-Received: by 10.170.50.210 with SMTP id 201mr1359416yks.33.1430153294834; Mon, 27 Apr 2015 09:48:14 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id rt16si26307278vdb.67.2015.04.27.09.48.13; Mon, 27 Apr 2015 09:48:14 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Received: by lists.linaro.org (Postfix, from userid 109) id 8327961DCC; Mon, 27 Apr 2015 16:48:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 8CF7461DA6; Mon, 27 Apr 2015 16:48:10 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 2D17861DC0; Mon, 27 Apr 2015 16:48:09 +0000 (UTC) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by lists.linaro.org (Postfix) with ESMTPS id C847B61DA6 for ; Mon, 27 Apr 2015 16:48:07 +0000 (UTC) Received: by wizk4 with SMTP id k4so107213802wiz.1 for ; Mon, 27 Apr 2015 09:48:07 -0700 (PDT) X-Received: by 10.180.98.97 with SMTP id eh1mr22462352wib.11.1430153287080; Mon, 27 Apr 2015 09:48:07 -0700 (PDT) Received: from e106441.cambridge.arm.com ([2001:41d0:a:3cb4::1]) by mx.google.com with ESMTPSA id ju2sm12376825wid.12.2015.04.27.09.48.05 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Apr 2015 09:48:06 -0700 (PDT) From: Stuart Haslam To: lng-odp@lists.linaro.org Date: Mon, 27 Apr 2015 17:48:02 +0100 Message-Id: <1430153282-8312-1-git-send-email-stuart.haslam@linaro.org> X-Mailer: git-send-email 2.1.1 X-Topics: patch Subject: [lng-odp] [PATCH 1/2] performance: pktio: test return value of odp_pktio_close() X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: stuart.haslam@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Coverity complains that the return value of odp_pktio_close() isn't being checked. This fixes https://bugs.linaro.org/show_bug.cgi?id=1513 Signed-off-by: Stuart Haslam --- test/performance/odp_pktio_perf.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/test/performance/odp_pktio_perf.c b/test/performance/odp_pktio_perf.c index 0be8d46..e24ceb5 100644 --- a/test/performance/odp_pktio_perf.c +++ b/test/performance/odp_pktio_perf.c @@ -746,10 +746,19 @@ static int test_term(void) int i; int ret = 0; - if (gbl_args->pktio_tx != gbl_args->pktio_rx) - odp_pktio_close(gbl_args->pktio_tx); + if (gbl_args->pktio_tx != gbl_args->pktio_rx) { + if (odp_pktio_close(gbl_args->pktio_tx) != 0) { + LOG_ERR("Failed to close pktio_tx\n"); + ret = -1; + } + } + destroy_inq(gbl_args->pktio_rx); - odp_pktio_close(gbl_args->pktio_rx); + + if (odp_pktio_close(gbl_args->pktio_rx) != 0) { + LOG_ERR("Failed to close pktio_rx\n"); + ret = -1; + } for (i = 0; i < gbl_args->args.num_ifaces; ++i) { snprintf(pool_name, sizeof(pool_name),