[RFC][PATCH 1/1] staging:vt6655: Remove checks around dev_kfree_skb

From: Maninder Singh
Date: Wed Jun 24 2015 - 02:15:07 EST


dev_kfree_skb checks for NULL pointer itself.

Signed-off-by: Maninder Singh <maninder1.s@xxxxxxxxxxx>
Reviewed-by: Akhilesh Kumar <akhilesh.k@xxxxxxxxxxx>
---
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/