From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] examples/kni: unchecked return value Date: Mon, 16 May 2016 14:32:38 +0200 Message-ID: <4940655.RtLajhii2r@xps13> References: <1462786710-22032-1-git-send-email-danielx.t.mrzyglod@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, helin.zhang@intel.com To: Daniel Mrzyglod 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) In-Reply-To: <1462786710-22032-1-git-send-email-danielx.t.mrzyglod@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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