Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183214
b: refs/heads/master
c: 447f18f
h: refs/heads/master
v: v3
  • Loading branch information
Sudhakar Rajashekhara authored and Kevin Hilman committed Feb 4, 2010
1 parent fc900a5 commit a8d6d7b
Show file tree
Hide file tree
Showing 2 changed files with 5 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: 2d517508060c22ef371a61495773cf890def291a
refs/heads/master: 447f18f1b4a3e86159353d016dcaac25414b3a42
6 changes: 4 additions & 2 deletions trunk/arch/arm/mach-davinci/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ int edma_alloc_channel(int channel,
void *data,
enum dma_event_q eventq_no)
{
unsigned i, done, ctlr = 0;
unsigned i, done = 0, ctlr = 0;

if (channel >= 0) {
ctlr = EDMA_CTLR(channel);
Expand All @@ -611,7 +611,7 @@ int edma_alloc_channel(int channel,
edma_info[i]->num_channels,
channel);
if (channel == edma_info[i]->num_channels)
return -ENOMEM;
break;
if (!test_and_set_bit(channel,
edma_info[i]->edma_inuse)) {
done = 1;
Expand All @@ -623,6 +623,8 @@ int edma_alloc_channel(int channel,
if (done)
break;
}
if (!done)
return -ENOMEM;
} else if (channel >= edma_info[ctlr]->num_channels) {
return -EINVAL;
} else if (test_and_set_bit(channel, edma_info[ctlr]->edma_inuse)) {
Expand Down

0 comments on commit a8d6d7b

Please sign in to comment.