Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1738728imm; Fri, 6 Jul 2018 05:45:40 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd8x4ez4YqoZsxXDnUA7o63lALHkOFtWCNNjpfgFGLZlGo9KS5UqOvPL34ajCjJ4HJMGQW8 X-Received: by 2002:a65:428b:: with SMTP id j11-v6mr9129591pgp.200.1530881140751; Fri, 06 Jul 2018 05:45:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530881140; cv=none; d=google.com; s=arc-20160816; b=YQVY5K2YYdgcPa4E2bCJ6mQEWtvhRssmh4Gvgyg+TiT/NrR/k68sdWXwCDR3k0D3po b0PdUpFpo0WInBeOXpWYupjb8fxA3xjSsJXENTp8JtDwDRfg/A7RnF9HsLLgEnf0ho1P 2WXYkdEky0tK/rBtZUYyYA6IC+PHt0+wMjgI488S6tRnbG9WVQR5SmfbgX3msUqkNSBb p/y9qC6gFhpj8GbepbTPiydrL5IFfo0v5Ba+A5kKuxopJ+4xooo42CEFbW6gVL4fUh3Z GfDK0EL+6kpIbM34HibtxDP2On4zS5GB6JUA7S1xCWyyTchV2JfB3qdnPG3sv+d8OaXr EIPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=HQqoi/kjyUMqj/2K1eqgIMGlugQZ4hwvOCoMd4CzPcM=; b=OWNB8EqoFlvjoRDRdTJTfijcef4h6iuZRz8Lj3XJ4DnndU4xaei1mEp9S1kEGJhY/5 k0Ql88DJ+jdzwdH9dfJ4GMYVZDhKNTjYaQCN87fpKCR5zvX1oYbsN1zj0HbZoY6ls3pK cVwVDP64gOdZTr3A99Mtw9WHp5aWKN+Gcvga31JMmfq0s651vxrQ4Z3nikoBh0V4+DNn BeVcIi5aiFCGrRKBPDx/KmMKBHGBCs4OWTqF+ejB657E2vsVmLhF1a+JBYik6qyPiYZa 1RF0VwCOLNNG+ddl/yPu2OlFbe+MFlEXL42iLTcGfG8QTh9+dmxP3RPTCP9qiAeeh7T+ TdaQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f4-v6si8102761plf.383.2018.07.06.05.45.25; Fri, 06 Jul 2018 05:45:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933109AbeGFMoc (ORCPT + 99 others); Fri, 6 Jul 2018 08:44:32 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:46791 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932783AbeGFMob (ORCPT ); Fri, 6 Jul 2018 08:44:31 -0400 Received: from wuerfel.lan ([46.223.138.35]) by mrelayeu.kundenserver.de (mreue001 [212.227.15.129]) with ESMTPA (Nemesis) id 0MWbbG-1fczk43BtK-00Xehr; Fri, 06 Jul 2018 14:44:22 +0200 From: Arnd Bergmann To: "David S. Miller" Cc: Arnd Bergmann , Nikolay Aleksandrov , Jiri Pirko , Yotam Gigi , Roopa Prabhu , Petr Machata , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net] net: bridge: fix br_vlan_get_{pvid,info} return values Date: Fri, 6 Jul 2018 14:44:02 +0200 Message-Id: <20180706124420.3129099-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K1:iPZOj7eBk6iL7Btc1sfOR1LSnfgsJ/nQpnfPN9od1SmpKOJk8Gn 9N/XonlXWyie11O1q6DIWIUTjN40R5CHH+veDfTPG9idaZGDqDtfrRpscJahdZEOJe9tB7V IcHHHUEfiGIi/KUMP3Jfl7z4Prmp0Tv5pwBO3Q/59FaL5hqc2uBkeQXvrAhOES27n4T9Sff sODVjCWotioJB0vx03isA== X-UI-Out-Filterresults: notjunk:1;V01:K0:kGFIZK7SvLA=:gu7gV06jJ3UquvfeuqhNOY HX9/V3TEmg7XlXeem+iFltw4BUPqPbUBTvXfaTMPQ8qLGN2rJxu7Aibhx1H76mohHx/vTG0Pf iykQfEkLGEmIagmCSlOk3aps7twVsQmkh8JTqHNJRxCrWmV3mLy9DrZ7mVyB3DRAtgz2us4bc 9oVi4rZvJVQf4NsqYJkv+E1/YbYsa3hTzk7aESfc98qrFSMhNFZC1QnGTql1v9ktR0IqMRSMG dui+PIvhnmHlosfB6Fw2XGgdcDvm+ZIAcgxtus6pKKwy0enq7mblehKzcXVPHrIYIE66zIr0x LRtU2QR6Y8W05BF8g3wnw1YrDewp0vWG7qrS33YxVGFcrq9HlqOHsCMGQTDuh7m0uOdwgngJ/ bFXFhMJB8DL9n1UT8XDpXS7pfYLl2zG0ypMNU/K9TJw8IKWrhdkHkoT17j6FBAW8fPBXZ/K2L hP4mii7oG/wxlB3ZiFO6V6TQqoxILnzM2u+6gsKtKm/rkFs1XvmI3Lwvkf/62wRaonWvvnd6G T/8rNr/v6h36goDWmpE+4vYbAU9aKNM3GdbJd8mTyPTdszxijlUHN4K/37uB12ltXSxw73rf8 y+uECN7nwlJIi8omjc57zk58ZHXtTpplU+wV8eqF2EROOXsxo1Ypq9S1Pq9DlP6VDYCykcqR/ FgGR2zNei+TkVUPNoS15Onr4LCxVk703Np+BU1sgRMiSZJQipIO/KkWn/k8ncioNR9P0= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These two functions return the regular -EINVAL failure in the normal code path, but return a nonstandard '-1' error otherwise, which gets interpreted as -EPERM. Let's change it to -EINVAL for the dummy functions as well. Fixes: 4d4fd36126d6 ("net: bridge: Publish bridge accessor functions") Signed-off-by: Arnd Bergmann --- include/linux/if_bridge.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h index 7843b98e1c6e..c20c7e197d07 100644 --- a/include/linux/if_bridge.h +++ b/include/linux/if_bridge.h @@ -105,13 +105,13 @@ static inline bool br_vlan_enabled(const struct net_device *dev) static inline int br_vlan_get_pvid(const struct net_device *dev, u16 *p_pvid) { - return -1; + return -EINVAL; } static inline int br_vlan_get_info(const struct net_device *dev, u16 vid, struct bridge_vlan_info *p_vinfo) { - return -1; + return -EINVAL; } #endif -- 2.9.0