提交 c56c81ab 编写于 作者: D Dan Williams

dmatest: fix max channels handling

The check for reaching max_channels is short circuited by 'continuing'
after successfully adding a channel.

[ Impact: make the 'max_channels' module parameter actually have an effect ]

Cc: <stable@kernel.org>
Reported-by: NDan Carpenter <error27@gmail.com>
Signed-off-by: NDan Williams <dan.j.williams@intel.com>
上级 577c9c45
......@@ -531,9 +531,7 @@ static int __init dmatest_init(void)
chan = dma_request_channel(mask, filter, NULL);
if (chan) {
err = dmatest_add_channel(chan);
if (err == 0)
continue;
else {
if (err) {
dma_release_channel(chan);
break; /* add_channel failed, punt */
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册