summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMahammad Ismayilzada <mahammad.ismayilzada@freescale.com>2015-05-20 18:34:22 (GMT)
committerHonghua Yin <Hong-Hua.Yin@freescale.com>2015-05-21 03:24:10 (GMT)
commit88d1f2201d74648b81ff17325f6b635d19c06648 (patch)
tree1ae1eafaf2e64f414ce41188c8239853a2cf1f8f
parent4e171757017a9dd7183255d4680f256ec5e4b5d4 (diff)
downloadlinux-fsl-qoriq-88d1f2201d74648b81ff17325f6b635d19c06648.tar.xz
qbman: Fix null pointer issue
bufs passed as NULL and dereferenced. Replaced with local variable. Signed-off-by: Mahammad Ismayilzada <mahammad.ismayilzada@freescale.com> Change-Id: I39aecee95b086567a21487ee2b751126aa0777f1 Reviewed-on: http://git.am.freescale.net:8181/36648 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Haiying Wang <Haiying.Wang@freescale.com> Reviewed-by: Roy Pledge <roy.pledge@freescale.com> Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
-rw-r--r--drivers/staging/fsl_qbman/bman_test_high.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/fsl_qbman/bman_test_high.c b/drivers/staging/fsl_qbman/bman_test_high.c
index 7bdd181..4676fb0 100644
--- a/drivers/staging/fsl_qbman/bman_test_high.c
+++ b/drivers/staging/fsl_qbman/bman_test_high.c
@@ -165,7 +165,9 @@ do_loop:
BUG_ON(tmp != num);
i -= num;
}
- i = bman_acquire(pool, NULL, 1, 0);
+
+ struct bm_buffer tmp_buf;
+ i = bman_acquire(pool, &tmp_buf, 1, 0);
BUG_ON(i > 0);
bufs_confirm();