aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/dmatest.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2009-04-08 15:08:23 -0700
committerDan Williams <dan.j.williams@intel.com>2009-04-08 15:08:23 -0700
commitc56c81abe7e684bc6203632d807303eb765690dc (patch)
tree463d5d7a89c9627625070e4a829bae44243643d0 /drivers/dma/dmatest.c
parent577c9c456f0e1371cbade38eaf91ae8e8a308555 (diff)
downloadkernel_samsung_smdk4412-c56c81abe7e684bc6203632d807303eb765690dc.zip
kernel_samsung_smdk4412-c56c81abe7e684bc6203632d807303eb765690dc.tar.gz
kernel_samsung_smdk4412-c56c81abe7e684bc6203632d807303eb765690dc.tar.bz2
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: Dan Carpenter <error27@gmail.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma/dmatest.c')
-rw-r--r--drivers/dma/dmatest.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index a27c0fb..fb7da51 100644
--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -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 */
}