netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] net: renesas: ravb: unintialized return value
@ 2016-12-01 20:57 Dan Carpenter
  2016-12-01 21:13 ` Sergei Shtylyov
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Dan Carpenter @ 2016-12-01 20:57 UTC (permalink / raw)
  To: Sergei Shtylyov, Johan Hovold
  Cc: David S. Miller, Yoshihiro Kaneko, Kazuya Mizuguchi, Simon Horman,
	Wolfram Sang, Andrew Lunn, Philippe Reynes, Niklas Söderlund,
	Arnd Bergmann, netdev, linux-renesas-soc, kernel-janitors

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@oracle.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");

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

* Re: [patch] net: renesas: ravb: unintialized return value
  2016-12-01 20:57 [patch] net: renesas: ravb: unintialized return value Dan Carpenter
@ 2016-12-01 21:13 ` Sergei Shtylyov
  2016-12-02  9:46 ` Johan Hovold
  2016-12-02 19:00 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Sergei Shtylyov @ 2016-12-01 21:13 UTC (permalink / raw)
  To: Dan Carpenter, Johan Hovold
  Cc: David S. Miller, Yoshihiro Kaneko, Kazuya Mizuguchi, Simon Horman,
	Wolfram Sang, Andrew Lunn, Philippe Reynes, Niklas Söderlund,
	Arnd Bergmann, netdev, linux-renesas-soc, kernel-janitors

Hello!

On 12/01/2016 11:57 PM, Dan Carpenter wrote:

> 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")

    Hm, I somehow missed this one, probably due to the horrific CC list. :-(

> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

MBR, Sergei

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

* Re: [patch] net: renesas: ravb: unintialized return value
  2016-12-01 20:57 [patch] net: renesas: ravb: unintialized return value Dan Carpenter
  2016-12-01 21:13 ` Sergei Shtylyov
@ 2016-12-02  9:46 ` Johan Hovold
  2016-12-02 19:00 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Johan Hovold @ 2016-12-02  9:46 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Sergei Shtylyov, Johan Hovold, David S. Miller, Yoshihiro Kaneko,
	Kazuya Mizuguchi, Simon Horman, Wolfram Sang, Andrew Lunn,
	Philippe Reynes, Niklas Söderlund, Arnd Bergmann, netdev,
	linux-renesas-soc, kernel-janitors

On Thu, Dec 01, 2016 at 11:57:44PM +0300, Dan Carpenter wrote:
> 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@oracle.com>

Thanks for catching this.

Reviewed-by: Johan Hovold <johan@kernel.org>

Johan

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

* Re: [patch] net: renesas: ravb: unintialized return value
  2016-12-01 20:57 [patch] net: renesas: ravb: unintialized return value Dan Carpenter
  2016-12-01 21:13 ` Sergei Shtylyov
  2016-12-02  9:46 ` Johan Hovold
@ 2016-12-02 19:00 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2016-12-02 19:00 UTC (permalink / raw)
  To: dan.carpenter
  Cc: sergei.shtylyov, johan, ykaneko0929, kazuya.mizuguchi.ks,
	horms+renesas, wsa+renesas, andrew, tremyfr,
	niklas.soderlund+renesas, arnd, netdev, linux-renesas-soc,
	kernel-janitors

From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Thu, 1 Dec 2016 23:57:44 +0300

> 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@oracle.com>

Applied.

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

end of thread, other threads:[~2016-12-02 19:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-01 20:57 [patch] net: renesas: ravb: unintialized return value Dan Carpenter
2016-12-01 21:13 ` Sergei Shtylyov
2016-12-02  9:46 ` Johan Hovold
2016-12-02 19:00 ` David Miller

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).