Re: [PATCH v1 04/34] NFC: st21nfca: Remove unreachable code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi Christophe,

On Mon, Dec 08, 2014 at 10:08:09PM +0100, Christophe Ricard wrote:
> kfree_skb(skb) in st21nfca_hci_event_received is never reach.
> 
> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Signed-off-by: Christophe Ricard <christophe-h.ricard@xxxxxx>
> ---
>  drivers/nfc/st21nfca/st21nfca.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/nfc/st21nfca/st21nfca.c b/drivers/nfc/st21nfca/st21nfca.c
> index f2596c8..880193b 100644
> --- a/drivers/nfc/st21nfca/st21nfca.c
> +++ b/drivers/nfc/st21nfca/st21nfca.c
> @@ -845,8 +845,6 @@ static int st21nfca_hci_event_received(struct nfc_hci_dev *hdev, u8 gate,
>  	default:
>  		return 1;
>  	}
> -	kfree_skb(skb);
> -	return 0;
That make sense to me, but while looking at this function, I think your
skb free in st21nfca_dep_event_received() is incorrect.
The HCI core manages the SKBs it sends and frees this skb.

Cheers,
Samuel.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux