[source] ar71xx/ag71xx_ethtool: don't return uninitialized return value on success

LEDE Commits lede-commits at lists.infradead.org
Sun Jun 11 05:27:45 PDT 2017


lynxis pushed a commit to source.git, branch master:
https://git.lede-project.org/10259416628da6f8098ec77be1b59c8f8951c8c4

commit 10259416628da6f8098ec77be1b59c8f8951c8c4
Author: Alexander Couzens <lynxis at fe80.eu>
AuthorDate: Sun Jun 11 12:51:58 2017 +0200

    ar71xx/ag71xx_ethtool: don't return uninitialized return value on success
    
    ag71xx_ethtool_set_ringparam() will return an uninitialized value on
    success.
    
    Found-by: Coverity Scan #1330877
    Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
---
 .../ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ethtool.c   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ethtool.c b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ethtool.c
index dfcbb54..f0e1021 100644
--- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ethtool.c
+++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ethtool.c
@@ -86,7 +86,7 @@ static int ag71xx_ethtool_set_ringparam(struct net_device *dev,
 	struct ag71xx *ag = netdev_priv(dev);
 	unsigned tx_size;
 	unsigned rx_size;
-	int err;
+	int err = 0;
 
 	if (er->rx_mini_pending != 0||
 	    er->rx_jumbo_pending != 0 ||



More information about the lede-commits mailing list