From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 8D7938E6A for ; Mon, 16 May 2016 14:32:44 +0200 (CEST) Received: by mail-wm0-f50.google.com with SMTP id a17so133666999wme.0 for ; Mon, 16 May 2016 05:32:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=D/mWMUKwQdGI6wkfloHAd2NfA5nZCpfv6FvXRiquwcA=; b=Q9CUUAUKdfffeqedO/lqlhwy7/jZYnoG8c/iZVO7Y9umUQiPYjL0kUPmGxLilSpX5m CAWm+8lMb1ZzHhuch3DyRfmKeYcyYgJwIvLkkDdkkPEKgM+PsCCUi7YJJYlo8Ifx1D9H A/TGkTiklVjEisNoJHiLEoRR+Zr5AUrwGMSLooygmNDzQlYGCoiJKIC2ORHuvXb73Omo fC51ZuFDgc7w3EFeEx1rodqsr2+zI1d6INA84/ry0WsM21xFybwtpnhoWplQ8CNWRpr7 /PfamhykZRh5d0kjZvaWqmttiIAzHtLhxHktlnT+GvwDuNseHYKNo2LD6G/voDR081KY SXMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=D/mWMUKwQdGI6wkfloHAd2NfA5nZCpfv6FvXRiquwcA=; b=NPvxuKQ52nypTKNludC+HpkXG4wVBqp15WFZazqoDctZ8DxGjmUg5spGYE1qwnqsp7 KCvEF3Ey89afE8JQCnLMfp4YwIAuwjU9FQSmRhMLz20jYsV5HxhICjjpK08lOT8qlLLQ wuilhalu4NLlbI1Fy4epqHID30gDKDCm9Im9YiJX6tMPt1W1yleOugBCHOMLFRUtd4Ut O14LuuTbgPfnD0+oBq4WIZAWJcnOrnUD7CuzEs8FklIhjS2E9aqeplO+wvIHfhwm30CU r2P7wUqOAHaHk1HyxSkeov47+J4fTW5YPstZ+32l8SmxR84TQy6cK+BpX1X0JN6Anpq8 9Hug== X-Gm-Message-State: AOPr4FXVzYpMEaWDrxstHrsZor9x7qdclTy45dkc/ontkMaPqB4RTP7cjtpD9ajNgcwz8OJ1 X-Received: by 10.28.54.224 with SMTP id y93mr17757325wmh.82.1463401964377; Mon, 16 May 2016 05:32:44 -0700 (PDT) Received: from xps13.localnet (139.20.90.92.rev.sfr.net. [92.90.20.139]) by smtp.gmail.com with ESMTPSA id jd4sm33498400wjb.43.2016.05.16.05.32.43 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 16 May 2016 05:32:43 -0700 (PDT) From: Thomas Monjalon To: Daniel Mrzyglod Cc: dev@dpdk.org, helin.zhang@intel.com Date: Mon, 16 May 2016 14:32:38 +0200 Message-ID: <4940655.RtLajhii2r@xps13> User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1462786710-22032-1-git-send-email-danielx.t.mrzyglod@intel.com> References: <1462786710-22032-1-git-send-email-danielx.t.mrzyglod@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] examples/kni: unchecked return value X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 May 2016 12:32:44 -0000 2016-05-09 11:38, Daniel Mrzyglod: > Fix issue reported by Coverity. > Coverity ID 30692 Better to put reference on top of Fixes: line. > If the function returns an error value, the error value may be mistaken for > a normal value. > > In kni_free_kni: Value returned from a function is not checked for errors > before being used One of the 2 sentences is enough. > Fixes: b475eb0bc400 ("examples/kni: new parameters") > > Signed-off-by: Daniel Mrzyglod > --- > examples/kni/main.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/examples/kni/main.c b/examples/kni/main.c > index a5297f2..dcecd09 100644 > --- a/examples/kni/main.c > +++ b/examples/kni/main.c > @@ -831,7 +831,8 @@ kni_free_kni(uint8_t port_id) > return -1; > > for (i = 0; i < p[port_id]->nb_kni; i++) { > - rte_kni_release(p[port_id]->kni[i]); > + if (rte_kni_release(p[port_id]->kni[i])) > + printf("fail to release kni\n"); Other error messages of this file start with an uppercase. Applied with above changes, thanks