Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933374AbbFWO0V (ORCPT ); Tue, 23 Jun 2015 10:26:21 -0400 Received: from mail.savoirfairelinux.com ([209.172.62.77]:55526 "EHLO mail.savoirfairelinux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932803AbbFWO0T (ORCPT ); Tue, 23 Jun 2015 10:26:19 -0400 From: Vivien Didelot To: netdev@vger.kernel.org Cc: sfeldma@gmail.com, Jiri Pirko , "David S. Miller" , linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, Vivien Didelot Subject: [PATCH] net: switchdev: ignore unsupported bridge flags Date: Tue, 23 Jun 2015 10:26:04 -0400 Message-Id: <1435069564-10241-1-git-send-email-vivien.didelot@savoirfairelinux.com> X-Mailer: git-send-email 2.4.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1112 Lines: 34 switchdev_port_bridge_getlink() queries SWITCHDEV_ATTR_PORT_BRIDGE_FLAGS attributes, but a driver doesn't need to implement this in order to get bridge link information. So error out only on errors different than -EOPNOTSUPP. (This is a follow-up patch for 7d4f8d8.) Signed-off-by: Vivien Didelot --- net/switchdev/switchdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c index f01d340..84f77a0 100644 --- a/net/switchdev/switchdev.c +++ b/net/switchdev/switchdev.c @@ -532,7 +532,7 @@ int switchdev_port_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq, int err; err = switchdev_port_attr_get(dev, &attr); - if (err) + if (err && err != -EOPNOTSUPP) return err; return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode, -- 2.4.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/