2015-06-24 06:15:03

by Maninder Singh

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

dev_kfree_skb checks for NULL pointer itself.

Signed-off-by: Maninder Singh <[email protected]>
Reviewed-by: Akhilesh Kumar <[email protected]>
---
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


2015-07-14 22:50:10

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [RFC][PATCH 1/1] staging:vt6655: Remove checks around dev_kfree_skb

On Wed, Jun 24, 2015 at 11:43:16AM +0530, Maninder Singh wrote:
> dev_kfree_skb checks for NULL pointer itself.
>
> Signed-off-by: Maninder Singh <[email protected]>
> Reviewed-by: Akhilesh Kumar <[email protected]>
> ---
> drivers/staging/vt6655/device_main.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)

Why is this a [RFC] email?

I don't apply RFC patches, because obviously you don't think they are
good enough to go in :)

Please fix up to be something you want to see accepted and then resend.

thanks,

greg k-h