From: Andrew Lunn <andrew@lunn.ch>
To: Guenter Roeck <linux@roeck-us.net>
Cc: "David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dsa: mv88e6xxx: Fix error handling in mv88e6xxx_set_port_state
Date: Thu, 16 Apr 2015 14:37:42 +0200 [thread overview]
Message-ID: <20150416123742.GG13105@lunn.ch> (raw)
In-Reply-To: <1429161162-2028-1-git-send-email-linux@roeck-us.net>
On Wed, Apr 15, 2015 at 10:12:42PM -0700, Guenter Roeck wrote:
> Return correct error code if _mv88e6xxx_reg_read returns an error.
>
> Fixes: facd95b2e0ec0 ("net: dsa: mv88e6xxx: Add Hardware bridging support")
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Hi Guenter
Good catch. I'm surprised there is no compiler warning, possibly used
before set.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Thanks
Andrew
> ---
> drivers/net/dsa/mv88e6xxx.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/dsa/mv88e6xxx.c b/drivers/net/dsa/mv88e6xxx.c
> index fc8d3b6ffe8e..f64186a5f634 100644
> --- a/drivers/net/dsa/mv88e6xxx.c
> +++ b/drivers/net/dsa/mv88e6xxx.c
> @@ -908,8 +908,10 @@ static int mv88e6xxx_set_port_state(struct dsa_switch *ds, int port, u8 state)
> mutex_lock(&ps->smi_mutex);
>
> reg = _mv88e6xxx_reg_read(ds, REG_PORT(port), PORT_CONTROL);
> - if (reg < 0)
> + if (reg < 0) {
> + ret = reg;
> goto abort;
> + }
>
> oldstate = reg & PORT_CONTROL_STATE_MASK;
> if (oldstate != state) {
> --
> 2.1.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-04-16 12:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-16 5:12 [PATCH] dsa: mv88e6xxx: Fix error handling in mv88e6xxx_set_port_state Guenter Roeck
2015-04-16 12:37 ` Andrew Lunn [this message]
2015-04-16 12:51 ` Guenter Roeck
2015-04-16 13:46 ` Guenter Roeck
2015-04-16 18:51 ` Geert Uytterhoeven
2015-04-17 2:05 ` Guenter Roeck
2015-04-16 16:13 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150416123742.GG13105@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.