diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2013-08-01 12:50:10 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-08-02 01:32:05 +0200 |
commit | 787381415cf967c5d6d1d7c5b5bd893376945edd (patch) | |
tree | 6a087dbe3875655ef89276f5c20487ee90115922 /drivers/net/macvlan.c | |
parent | macvlan: better mode validation (diff) | |
download | linux-787381415cf967c5d6d1d7c5b5bd893376945edd.tar.xz linux-787381415cf967c5d6d1d7c5b5bd893376945edd.zip |
macvlan: handle set_promiscuity failures
It's quite unlikely that dev_set_promiscuity will fail,
but worth checking just in case.
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/macvlan.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index 13937f9c04ad..d0f9c2fd1d4f 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c @@ -337,8 +337,11 @@ static int macvlan_open(struct net_device *dev) int err; if (vlan->port->passthru) { - if (!(vlan->flags & MACVLAN_FLAG_NOPROMISC)) - dev_set_promiscuity(lowerdev, 1); + if (!(vlan->flags & MACVLAN_FLAG_NOPROMISC)) { + err = dev_set_promiscuity(lowerdev, 1); + if (err < 0) + goto out; + } goto hash_add; } |