Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755147AbbGPIy7 (ORCPT ); Thu, 16 Jul 2015 04:54:59 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:28289 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754262AbbGPIy5 (ORCPT ); Thu, 16 Jul 2015 04:54:57 -0400 Date: Thu, 16 Jul 2015 11:54:30 +0300 From: Dan Carpenter To: Maninder Singh Cc: "forest@alittletooquiet.net" , "gregkh@linuxfoundation.org" , "devel@driverdev.osuosl.org" , "gclement@baobob.org" , "tvboxspy@gmail.com" , "linux-kernel@vger.kernel.org" , "joe@perches.com" , PANKAJ MISHRA Subject: Re: [RESEND PATCH 1/1] staging:vt6655: remove checks around dev_kfree_skb Message-ID: <20150716085430.GF5784@mwanda> References: <686357594.854551437036306449.JavaMail.weblogic@ep2mlwas07d> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <686357594.854551437036306449.JavaMail.weblogic@ep2mlwas07d> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 918 Lines: 26 On Thu, Jul 16, 2015 at 08:45:06AM +0000, Maninder Singh wrote: > where we are checking for (pTDInfo->skb), we are using it in above line. > and it does not look good, thats why we should remove thse checks and i have suggested > changes. > > code snippet:- > ----------------------- > > if (pTDInfo->skb_dma && (pTDInfo->skb_dma != pTDInfo->buf_dma)) ^^^^^^^^^^^^^^^^ This is allocated after ->skb so if ->skb_dma is non-NULL then ->skb is also non-NULL. > dma_unmap_single(&pDevice->pcid->dev, pTDInfo->skb_dma, > pTDInfo->skb->len, DMA_TO_DEVICE); Is this a static checker warning? If so then it's a false positive. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/