diff options
author | Dan Williams <dan.j.williams@intel.com> | 2009-04-08 15:08:23 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-05-18 16:35:16 -0700 |
commit | 76616a7e4d43cc7a2383c2bc67e27636c43ffdfa (patch) | |
tree | 5fd636c071890baf0aaf842796bcd49183f12abc /drivers | |
parent | 7388d0bb77dd8b7dd2a2f88f0e0042329cd33752 (diff) |
dmatest: fix max channels handling
commit c56c81abe7e684bc6203632d807303eb765690dc upstream.
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 ]
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dma/dmatest.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c index e190d8b30700..7ffc5ac73c2f 100644 --- a/drivers/dma/dmatest.c +++ b/drivers/dma/dmatest.c @@ -410,9 +410,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 */ } |