Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751438AbbFXGPD (ORCPT ); Wed, 24 Jun 2015 02:15:03 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:60085 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751018AbbFXGO5 (ORCPT ); Wed, 24 Jun 2015 02:14:57 -0400 X-AuditID: cbfee68e-f79c56d000006efb-85-558a4addaf1d From: Maninder Singh To: forest@alittletooquiet.net, gregkh@linuxfoundation.org, tvboxspy@gmail.com, gclement@baobob.org, joe@perches.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Cc: pankaj.m@samsung.com, Maninder Singh Subject: [RFC][PATCH 1/1] staging:vt6655: Remove checks around dev_kfree_skb Date: Wed, 24 Jun 2015 11:43:16 +0530 Message-id: <1435126397-6603-1-git-send-email-maninder1.s@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrFLMWRmVeSWpSXmKPExsWyRsSkRveuV1eoweTNAhZ7zvxit7g/4RGr xYwdbhbNi9ezWcy+/5jF4vKuOWwWh+e3sVjce7OVyWLS843MDpwezY3vWT1ONDxn8bi37zCL x85Zd9k99s9dw+7xZdU1Zo++LasYPT5vkgvgiOKySUnNySxLLdK3S+DKWPJ6K2PBY46Kp49a WBoYt7B3MXJySAiYSJzZ3cUMYYtJXLi3nq2LkYtDSGApo8S5E7vYYIo+XNvACJGYzijx5tNN VpCEkMBPRond821BbDYBPYlVu/awgBSJCGxilFh/Yi1TFyMHB7OAk8T0r3ogNcICPhL37q5k BLFZBFQlVjW+YQKxeQXcJHpXXGMFKZcQUJCYM8kGZIyEwCp2ietbpkPVC0h8m3yIBaJGVmLT AaijJSUOrrjBMoFRcAEjwypG0dSC5ILipPQiI73ixNzi0rx0veT83E2MwCA//e9Z3w7Gmwes DzEKcDAq8fDqW3SFCrEmlhVX5h5iNAXaMJFZSjQ5HxhLeS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DTu+5rpq5kZDQMn1smdmzBlduGHnAWHeV//vX3f24bXP0Jy5QfZfiWW4oxEQy3m ouJEADOA99u3AgAA 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: 1333 Lines: 40 dev_kfree_skb checks for NULL pointer itself. Signed-off-by: Maninder Singh Reviewed-by: Akhilesh Kumar --- drivers/staging/vt6655/device_main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index ca578d6..0c4b0de 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -767,8 +767,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); } @@ -786,8 +785,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/