Following code looks like it might be wrong.  I don't know much about
the way the stt infrastructure is being used, so feel free to ignore if
it is expected to return NETDEV_TX_OK even in error cases (just seems
strange).

Caught by compiler warning:

  /home/travis/build/ovsrobot/ovs/datapath/linux/stt.c: In function 
‘ovs_stt_xmit’:
  /home/travis/build/ovsrobot/ovs/datapath/linux/stt.c:1005:6: warning: 
variable ‘err’ set but not used [-Wunused-but-set-variable]
    int err;
        ^

If not used, then consider alternatively just dropping the variable.

Signed-off-by: Aaron Conole <[email protected]>
---

diff --git a/datapath/linux/compat/stt.c b/datapath/linux/compat/stt.c
index 506f1d90a..5f045120e 100644
--- a/datapath/linux/compat/stt.c
+++ b/datapath/linux/compat/stt.c
@@ -1029,7 +1029,7 @@ netdev_tx_t ovs_stt_xmit(struct sk_buff *skb)
 error:
        kfree_skb(skb);
        dev->stats.tx_errors++;
-       return NETDEV_TX_OK;
+       return err;
 }
 EXPORT_SYMBOL(ovs_stt_xmit);
 
---
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to