Message ID | 1476717395-15999-1-git-send-email-weiyj.lk@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
On Mon, Oct 17, 2016 at 03:16:35PM +0000, Wei Yongjun wrote: > From: Wei Yongjun <weiyongjun1@huawei.com> > > Fix to return a negative error code from the error handling > case instead of 0, as done elsewhere in this function. Applied, thanks > > Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> > --- > drivers/dma/edma.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c > index 844e87b..ec478a2 100644 > --- a/drivers/dma/edma.c > +++ b/drivers/dma/edma.c > @@ -1624,6 +1624,7 @@ static int edma_alloc_chan_resources(struct dma_chan *chan) > if (echan->slot[0] < 0) { > dev_err(dev, "Entry slot allocation failed for channel %u\n", > EDMA_CHAN_SLOT(echan->ch_num)); > + ret = echan->slot[0]; > goto err_slot; > } > > > >
diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index 844e87b..ec478a2 100644 --- a/drivers/dma/edma.c +++ b/drivers/dma/edma.c @@ -1624,6 +1624,7 @@ static int edma_alloc_chan_resources(struct dma_chan *chan) if (echan->slot[0] < 0) { dev_err(dev, "Entry slot allocation failed for channel %u\n", EDMA_CHAN_SLOT(echan->ch_num)); + ret = echan->slot[0]; goto err_slot; }