From: David Miller <davem@davemloft.net>
To: arvid.brodin@xdin.com
Cc: netdev@vger.kernel.org, shemminger@vyatta.com, joe@perches.com,
jboticario@gmail.com, balferreira@googlemail.com
Subject: Re: [PATCH v2] net/hsr: Add support for the High-availability Seamless Redundancy protocol (HSRv0)
Date: Fri, 28 Jun 2013 21:16:32 -0700 (PDT) [thread overview]
Message-ID: <20130628.211632.1064715548223073397.davem@davemloft.net> (raw)
In-Reply-To: <51CB05BB.3030909@xdin.com>
From: Arvid Brodin <arvid.brodin@xdin.com>
Date: Wed, 26 Jun 2013 17:16:11 +0200
> +static int hsr_dev_open(struct net_device *dev)
> +{
> + struct hsr_priv *hsr_priv;
> +
> + hsr_priv = netdev_priv(dev);
> +
> + if (hsr_priv->slave[0])
> + dev_open(hsr_priv->slave[0]);
> + if (hsr_priv->slave[1])
> + dev_open(hsr_priv->slave[1]);
> +
> + return 0;
> +}
dev_open() can and does fail, you must thus check for error returns, undo any
necessary state, and propagate that error to callers of hsr_dev_open.
next prev parent reply other threads:[~2013-06-29 4:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-26 15:16 [PATCH v2] net/hsr: Add support for the High-availability Seamless Redundancy protocol (HSRv0) Arvid Brodin
2013-06-29 4:16 ` David Miller [this message]
2013-07-01 23:48 ` Arvid Brodin
2013-07-08 15:54 ` Arvid Brodin
2013-08-20 17:36 ` Arvid Brodin
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=20130628.211632.1064715548223073397.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=arvid.brodin@xdin.com \
--cc=balferreira@googlemail.com \
--cc=jboticario@gmail.com \
--cc=joe@perches.com \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox