Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 374622
b: refs/heads/master
c: 945b5af
h: refs/heads/master
v: v3
  • Loading branch information
Andy Shevchenko authored and Vinod Koul committed Apr 15, 2013
1 parent 53385c0 commit f719b02
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 77101ce578bb365e44c2944d6c338c68206e6e10
refs/heads/master: 945b5af3cedcdfed6d2d940e53cd19933bb57386
11 changes: 9 additions & 2 deletions trunk/drivers/dma/dmatest.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ static int dmatest_func(void *data)
dma_cookie_t cookie;
enum dma_status status;
enum dma_ctrl_flags flags;
u8 pq_coefs[pq_sources + 1];
u8 *pq_coefs = NULL;
int ret;
int src_cnt;
int dst_cnt;
Expand All @@ -302,10 +302,15 @@ static int dmatest_func(void *data)
/* force odd to ensure dst = src */
src_cnt = min_odd(pq_sources | 1, dma_maxpq(dev, 0));
dst_cnt = 2;

pq_coefs = kmalloc(pq_sources+1, GFP_KERNEL);
if (!pq_coefs)
goto err_thread_type;

for (i = 0; i < src_cnt; i++)
pq_coefs[i] = 1;
} else
goto err_srcs;
goto err_thread_type;

thread->srcs = kcalloc(src_cnt+1, sizeof(u8 *), GFP_KERNEL);
if (!thread->srcs)
Expand Down Expand Up @@ -533,6 +538,8 @@ static int dmatest_func(void *data)
err_srcbuf:
kfree(thread->srcs);
err_srcs:
kfree(pq_coefs);
err_thread_type:
pr_notice("%s: terminating after %u tests, %u failures (status %d)\n",
thread_name, total_tests, failed_tests, ret);

Expand Down

0 comments on commit f719b02

Please sign in to comment.