Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752737AbbGODX3 (ORCPT ); Tue, 14 Jul 2015 23:23:29 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:54959 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751918AbbGODX1 (ORCPT ); Tue, 14 Jul 2015 23:23:27 -0400 X-AuditID: cbfee68d-f79106d00000728c-2c-55a5d22d1ada From: Maninder Singh To: forest@alittletooquiet.net, gregkh@linuxfoundation.org Cc: tvboxspy@gmail.com, gclement@baobob.org, joe@perches.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, pankaj.m@samsung.com, Maninder Singh Subject: [RESEND PATCH 1/1] staging:vt6655: remove checks around dev_kfree_skb Date: Wed, 15 Jul 2015 08:52:51 +0530 Message-id: <1436930571-17832-1-git-send-email-maninder1.s@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrDLMWRmVeSWpSXmKPExsWyRsSkWlf30tJQg69fFCz2nPnFbnF/wiNW ixk73CyaF69ns5h9/zGLxeVdc9gsDs9vY7G492Yrk8Wk5xuZHTg9mhvfs3qcaHjO4nFv32EW j52z7rJ77J+7ht3jy6przB59W1YxenzeJBfAEcVlk5Kak1mWWqRvl8CVMeVFE1PBXY6KmaeW sjQwLmfvYuTkkBAwkei7upwVwhaTuHBvPVsXIxeHkMBSRomZrY9YYYpWzHnLDJGYzigx++M1 qKqfjBJHnrYwglSxCehJrNq1hwXEFhGwkjh6+gI7SBGzwC5GiaW7+5lAEsICfhLT3pxnA7FZ BFQlpnz9AxbnFXCXaGnuBGrgAFqnIDFnkg1Ir4TAMnaJrYsbWSDqBSS+TT7EAlEjK7HpADPE dZISB1fcYJnAKLiAkWEVo2hqQXJBcVJ6kaFecWJucWleul5yfu4mRmCgn/73rHcH4+0D1ocY BTgYlXh4GxYtDRViTSwrrsw9xGgKtGEis5Rocj4wnvJ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yd/n1iXtBqx0MHtXRfz9r+dU3MVxP1yhb+PxtsHr67qMRSnJFoqMVcVJwI AOd/bNa5AgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1325 Lines: 42 dev_kfree_skb checks for NULL pointer itself, Thus no need of explicit NULL check. Signed-off-by: Maninder Singh --- drivers/staging/vt6655/device_main.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index ed040fb..1a50ea6 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -758,9 +758,7 @@ static void device_free_td0_ring(struct vnt_private *pDevice) dma_unmap_single(&pDevice->pcid->dev, pTDInfo->skb_dma, pTDInfo->skb->len, DMA_TO_DEVICE); - if (pTDInfo->skb) - dev_kfree_skb(pTDInfo->skb); - + dev_kfree_skb(pTDInfo->skb); kfree(pDesc->pTDInfo); } } @@ -777,9 +775,7 @@ static void device_free_td1_ring(struct vnt_private *pDevice) dma_unmap_single(&pDevice->pcid->dev, pTDInfo->skb_dma, pTDInfo->skb->len, DMA_TO_DEVICE); - if (pTDInfo->skb) - dev_kfree_skb(pTDInfo->skb); - + dev_kfree_skb(pTDInfo->skb); kfree(pDesc->pTDInfo); } } -- 1.7.9.5 -- 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/