lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161201205744.GB10701@mwanda>
Date:   Thu, 1 Dec 2016 23:57:44 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
        Johan Hovold <johan@...nel.org>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Yoshihiro Kaneko <ykaneko0929@...il.com>,
        Kazuya Mizuguchi <kazuya.mizuguchi.ks@...esas.com>,
        Simon Horman <horms+renesas@...ge.net.au>,
        Wolfram Sang <wsa+renesas@...g-engineering.com>,
        Andrew Lunn <andrew@...n.ch>,
        Philippe Reynes <tremyfr@...il.com>,
        Niklas Söderlund 
        <niklas.soderlund+renesas@...natech.se>,
        Arnd Bergmann <arnd@...db.de>, netdev@...r.kernel.org,
        linux-renesas-soc@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [patch] net: renesas: ravb: unintialized return value

We want to set the other "err" variable here so that we can return it
later.  My version of GCC misses this issue but I caught it with a
static checker.

Fixes: 9f70eb339f52 ("net: ethernet: renesas: ravb: fix fixed-link phydev leaks")
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
---
Applies to the net tree for 4.10.

diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
index 2c0357c..92d7692 100644
--- a/drivers/net/ethernet/renesas/ravb_main.c
+++ b/drivers/net/ethernet/renesas/ravb_main.c
@@ -1016,8 +1016,6 @@ static int ravb_phy_init(struct net_device *ndev)
 	 * at this time.
 	 */
 	if (priv->chip_id == RCAR_GEN3) {
-		int err;
-
 		err = phy_set_max_speed(phydev, SPEED_100);
 		if (err) {
 			netdev_err(ndev, "failed to limit PHY to 100Mbit/s\n");

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ