From: Pavan Savoy Date: Wed, 10 Aug 2011 15:18:36 +0000 (-0500) Subject: drivers:misc: ti-st: free skb on firmware download X-Git-Tag: v3.1-rc4~7^2~1 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=76ff0e64d42fac59fb756536342a3d3f3e4e8833;p=linux.git drivers:misc: ti-st: free skb on firmware download If during validation of the firmware download the data doesn't match what is expected out of the chip, this calls for a firmware download failure and a retry. Free the SKB which collects response during such scenarios. Signed-off-by: Pavan Savoy Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c index d8ca4068a928..3a3580566dfc 100644 --- a/drivers/misc/ti-st/st_kim.c +++ b/drivers/misc/ti-st/st_kim.c @@ -68,6 +68,7 @@ void validate_firmware_response(struct kim_data_s *kim_gdata) if (unlikely(skb->data[5] != 0)) { pr_err("no proper response during fw download"); pr_err("data6 %x", skb->data[5]); + kfree_skb(skb); return; /* keep waiting for the proper response */ } /* becos of all the script being downloaded */