[PATCH] [media] as102: fix potential double free in as102_fw_upload()

2015-10-23 Thread Christian Engelmayer
In case the request to locate the firmware file part 2 fails, the error path releases the already freed firmware memory location again. Thus reset the firmware pointer to NULL after releasing firmware file part 1. Signed-off-by: Christian Engelmayer --- drivers/media/usb/as102/as102_fw.c | 1

[PATCH] [media] c8sectpfe: Fix uninitialized return in load_c8sectpfe_fw_step1()

2015-09-18 Thread Christian Engelmayer
In case of failure loading the firmware, function load_c8sectpfe_fw_step1() uses the uninitialized variable ret as return value instead of the retrieved error value. Make sure the result is deterministic. Detected by Coverity CID 1324230. Signed-off-by: Christian Engelmayer --- Compile tested

[PATCH] [media] c8sectpfe: Fix uninitialized variable in load_slim_core_fw()

2015-09-18 Thread Christian Engelmayer
Variable err in function load_slim_core_fw() is used without initializer. Make sure that the result is deterministic. Detected by Coverity CID 1324265. Signed-off-by: Christian Engelmayer --- Compile tested only. Applies against linux-next. --- drivers/media/platform/sti/c8sectpfe/c8sectpfe

[PATCH] [media] mn88472: Fix possible leak in mn88472_init()

2015-05-02 Thread Christian Engelmayer
Commit 307e95c92257 ("[media] mn88472: implement firmware parity check") introduced the usage of exit paths that do not free the already allocated firmware data in case the parity handling fails. Go through the correct exit paths. Detected by Coverity CID 1295989. Signed-off-by:

[PATCH] [media] cx88: Fix possible leak in cx8802_probe()

2015-02-14 Thread Christian Engelmayer
In case allocation vb2_dma_sg_init_ctx() fails during cx8802_probe(), the already allocated cx8802 device structure memory is not freed in the used exit path. Thus adapt the cleanup handling accordingly. Detected by Coverity CID 1260065. Signed-off-by: Christian Engelmayer --- Compile tested

[PATCH] [media] si2165: Fix possible leak in si2165_upload_firmware()

2015-02-11 Thread Christian Engelmayer
-off-by: Christian Engelmayer --- Compile tested only. Applies against linux-next. --- drivers/media/dvb-frontends/si2165.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/dvb-frontends/si2165.c b/drivers/media/dvb-frontends/si2165.c index 98ddb49ad52b