netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: ethernet: ti: cpdma: rate is not changed - correct case
@ 2017-12-06 14:41 Ivan Khoronzhuk
  2017-12-06 21:35 ` David Miller
  0 siblings, 1 reply; 7+ messages in thread
From: Ivan Khoronzhuk @ 2017-12-06 14:41 UTC (permalink / raw)
  To: grygorii.strashko
  Cc: netdev, davem, linux-omap, linux-kernel, Ivan Khoronzhuk

If rate is the same as set it's correct case.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
---
Based on net-next/master

 drivers/net/ethernet/ti/davinci_cpdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/net/ethernet/ti/davinci_cpdma.c
index e4d6edf..dbe9167 100644
--- a/drivers/net/ethernet/ti/davinci_cpdma.c
+++ b/drivers/net/ethernet/ti/davinci_cpdma.c
@@ -841,7 +841,7 @@ int cpdma_chan_set_rate(struct cpdma_chan *ch, u32 rate)
 		return -EINVAL;
 
 	if (ch->rate == rate)
-		return rate;
+		return 0;
 
 	ctlr = ch->ctlr;
 	spin_lock_irqsave(&ctlr->lock, flags);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-12-07 20:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-06 14:41 [PATCH net-next] net: ethernet: ti: cpdma: rate is not changed - correct case Ivan Khoronzhuk
2017-12-06 21:35 ` David Miller
2017-12-07 19:48   ` Ivan Khoronzhuk
2017-12-07 19:50     ` David Miller
2017-12-07 20:10       ` Ivan Khoronzhuk
2017-12-07 20:13         ` David Miller
2017-12-07 20:21           ` Ivan Khoronzhuk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).