summaryrefslogtreecommitdiff
path: root/drivers/staging/fsl_dce/tests/performance_simple/dce_perf_simple.c
diff options
context:
space:
mode:
authorYin Honghua-R63875 <Hong-Hua.Yin@freescale.com>2015-11-09 01:45:51 (GMT)
committerYin Honghua-R63875 <Hong-Hua.Yin@freescale.com>2015-11-09 01:45:51 (GMT)
commit61f0e119c752d7b66f974089de465729599ef7b2 (patch)
tree5fbab439958c7768eccee0d55e40e0fcab373383 /drivers/staging/fsl_dce/tests/performance_simple/dce_perf_simple.c
parentcfb981f998cf66d88f903dac8d20c52aa412482b (diff)
parent300c3ff86988bc13e310b58d9c7c786528697150 (diff)
downloadlinux-fsl-qoriq-61f0e119c752d7b66f974089de465729599ef7b2.tar.xz
Merge pull request #61 in SDK/linux-devel from ~R54964/linux-devel:bug-fix to master
* commit '300c3ff86988bc13e310b58d9c7c786528697150': fsl-qbman: Handle memory leaks fsl-pme: Check for null pointers fsl-dce: Handle memory allocation failures fsl-dce: Correct error paths and add new labels fsl_qbman: null check for lni in qman_ceemt_sp_release
Diffstat (limited to 'drivers/staging/fsl_dce/tests/performance_simple/dce_perf_simple.c')
-rw-r--r--drivers/staging/fsl_dce/tests/performance_simple/dce_perf_simple.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/staging/fsl_dce/tests/performance_simple/dce_perf_simple.c b/drivers/staging/fsl_dce/tests/performance_simple/dce_perf_simple.c
index d91c42c..388f420 100644
--- a/drivers/staging/fsl_dce/tests/performance_simple/dce_perf_simple.c
+++ b/drivers/staging/fsl_dce/tests/performance_simple/dce_perf_simple.c
@@ -816,8 +816,10 @@ static int do_operation(void)
pr_err("fsl_dce_chunk_deflate_params failed %d\n", ret);
def_process_req = kzalloc(sizeof(*def_process_req), GFP_KERNEL);
- if (!def_process_req)
+ if (!def_process_req) {
pr_err("Line %d\n", __LINE__);
+ return -ENOMEM;
+ }
init_completion(&def_process_req->cb_done);
@@ -951,8 +953,10 @@ done:
if (fsl_dce_get_status(def_process_req->output_fd.status) != STREAM_END)
goto skip_output_copy;
test_data->out_data = vmalloc(def_process_req->dce_cf[0].length);
- if (!test_data->out_data)
+ if (!test_data->out_data) {
pr_err("Unable to allocate output data\n");
+ return -ENOMEM;
+ }
test_data->out_data_len = def_process_req->dce_cf[0].length;
if (!bman_output) {