Re: [PATCH] [media] Staging: media/lirc: don't call put_ir_rx on rx twice

2017-02-17 Thread Dan Carpenter
This one is a false positive. The original code is correct. I was looking through my mail boxes to see the history of this and why it hadn't been fixed earlier. Someone tried to fix it in 2011: https://www.spinics.net/lists/linux-driver-devel/msg17403.html Then I complained about it again in

Re: [PATCH] [media] Staging: media/lirc: don't call put_ir_rx on rx twice

2017-02-17 Thread Dan Carpenter
This one is a false positive. The original code is correct. I was looking through my mail boxes to see the history of this and why it hadn't been fixed earlier. Someone tried to fix it in 2011: https://www.spinics.net/lists/linux-driver-devel/msg17403.html Then I complained about it again in

[PATCH] [media] Staging: media/lirc: don't call put_ir_rx on rx twice

2017-02-17 Thread Colin King
From: Colin Ian King There is an exit path where rx is kfree'd on put_ir_rx and then a jump to label out_put_xx will again kfree it with another call to put_ir_rx. Fix this by adding a new label that avoids this 2nd call to put_ir_rx for this specific case. Detected

[PATCH] [media] Staging: media/lirc: don't call put_ir_rx on rx twice

2017-02-17 Thread Colin King
From: Colin Ian King There is an exit path where rx is kfree'd on put_ir_rx and then a jump to label out_put_xx will again kfree it with another call to put_ir_rx. Fix this by adding a new label that avoids this 2nd call to put_ir_rx for this specific case. Detected with CoverityScan,