ti-st: do not free skb in st_send_frame if receive call returns error
Nagarjuna Kristam [Fri, 2 Mar 2012 07:10:56 +0000 (12:10 +0530)]
In st_send_frame, do not free skb when recveive[hci_recv_frame] function call
returns failure. Since, skb is already freed in hci_recv_frame on failure.

Bug 946756
Bug 949028

Change-Id: I3ef9a77f408a6a5329a0817547e0c0e08ec45f87
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: http://git-master/r/87138
Reviewed-by: Rakesh Kumar <krakesh@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

drivers/misc/ti-st/st_core.c

index 0308744..dde6d57 100644 (file)
@@ -122,7 +122,6 @@ void st_send_frame(unsigned char chnl_id, struct st_data_s *st_gdata)
                        (st_gdata->list[chnl_id]->priv_data, st_gdata->rx_skb)
                             != 0)) {
                        pr_err(" proto stack %d's ->recv failed", chnl_id);
-                       kfree_skb(st_gdata->rx_skb);
                        return;
                }
        } else {