Skip to content

Commit

Permalink
dmatest: fix max channels handling
Browse files Browse the repository at this point in the history
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: Dan Carpenter <error27@gmail.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
  • Loading branch information
Dan Williams committed Apr 8, 2009
1 parent 577c9c4 commit c56c81a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/dma/dmatest.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
}
Expand Down

0 comments on commit c56c81a

Please sign in to comment.