From 88d1f2201d74648b81ff17325f6b635d19c06648 Mon Sep 17 00:00:00 2001 From: Mahammad Ismayilzada Date: Wed, 20 May 2015 14:34:22 -0400 Subject: qbman: Fix null pointer issue bufs passed as NULL and dereferenced. Replaced with local variable. Signed-off-by: Mahammad Ismayilzada Change-Id: I39aecee95b086567a21487ee2b751126aa0777f1 Reviewed-on: http://git.am.freescale.net:8181/36648 Tested-by: Review Code-CDREVIEW Reviewed-by: Haiying Wang Reviewed-by: Roy Pledge Reviewed-by: Honghua Yin 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(); -- cgit v0.10.2