Skip to content

Commit

Permalink
sata_dwc_460ex: fix return value of dma_dwc_xfer_setup()
Browse files Browse the repository at this point in the history
The caller expects this function to return the DMA channel number on success,
while it returns 0...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  • Loading branch information
Sergei Shtylyov authored and Jeff Garzik committed Mar 2, 2011
1 parent c211962 commit d285e8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/ata/sata_dwc_460ex.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#undef DRV_NAME
#undef DRV_VERSION
#define DRV_NAME "sata-dwc"
#define DRV_VERSION "1.1"
#define DRV_VERSION "1.2"

/* SATA DMA driver Globals */
#define DMA_NUM_CHANS 1
Expand Down Expand Up @@ -718,7 +718,7 @@ static int dma_dwc_xfer_setup(struct scatterlist *sg, int num_elems,
/* Program the CTL register with src enable / dst enable */
out_le32(&(host_pvt.sata_dma_regs->chan_regs[dma_ch].ctl.low),
DMA_CTL_LLP_SRCEN | DMA_CTL_LLP_DSTEN);
return 0;
return dma_ch;
}

/*
Expand Down

0 comments on commit d285e8b

Please sign in to comment.