Skip to content

Commit

Permalink
dma: mv_xor: fix error checking of irq_of_parse_and_map()
Browse files Browse the repository at this point in the history
The irq_of_parse_and_map() function returns 0 on failure, and does not
return an error code, so we fix the calling site of
irq_of_parse_and_map() in the mv_xor driver.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  • Loading branch information
Thomas Petazzoni committed Nov 22, 2012
1 parent 2d0a074 commit f8eb9e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/dma/mv_xor.c
Original file line number Diff line number Diff line change
Expand Up @@ -1312,8 +1312,8 @@ static int __devinit mv_xor_probe(struct platform_device *pdev)
dma_cap_set(DMA_INTERRUPT, cap_mask);

irq = irq_of_parse_and_map(np, 0);
if (irq < 0) {
ret = irq;
if (!irq) {
ret = -ENODEV;
goto err_channel_add;
}

Expand Down

0 comments on commit f8eb9e7

Please sign in to comment.