Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 358511
b: refs/heads/master
c: f44b92f
h: refs/heads/master
i:
  358509: 6153da7
  358507: 6ae12a3
  358503: e0be341
  358495: fca891a
v: v3
  • Loading branch information
Andy Shevchenko authored and Vinod Koul committed Jan 12, 2013
1 parent 4d99275 commit 61db587
Show file tree
Hide file tree
Showing 2 changed files with 4 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: 0e7264cc79a2d5c0ffa32c08d8f1cf84b2ec4fef
refs/heads/master: f44b92f4dd2f6caf326b149e0b9636a1d4e50184
5 changes: 3 additions & 2 deletions trunk/drivers/dma/dw_dmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1355,6 +1355,9 @@ struct dw_cyclic_desc *dw_dma_cyclic_prep(struct dma_chan *chan,

retval = ERR_PTR(-EINVAL);

if (unlikely(!is_slave_direction(direction)))
goto out_err;

if (direction == DMA_MEM_TO_DEV)
reg_width = __ffs(sconfig->dst_addr_width);
else
Expand All @@ -1369,8 +1372,6 @@ struct dw_cyclic_desc *dw_dma_cyclic_prep(struct dma_chan *chan,
goto out_err;
if (unlikely(buf_addr & ((1 << reg_width) - 1)))
goto out_err;
if (unlikely(!(direction & (DMA_MEM_TO_DEV | DMA_DEV_TO_MEM))))
goto out_err;

retval = ERR_PTR(-ENOMEM);

Expand Down

0 comments on commit 61db587

Please sign in to comment.