commit | d0186842ec5f456af531c66ee1ca64a8682695e6 | [log] [tgz] |
---|---|---|
author | Florian Fainelli <f.fainelli@gmail.com> | Thu Sep 24 17:27:44 2020 -0700 |
committer | David S. Miller <davem@davemloft.net> | Fri Sep 25 14:12:18 2020 -0700 |
tree | 1128c50e3baff5b3b8016e4d6d8bf8355cb73bf2 | |
parent | 7806f6561cd51de382f7628e7f4ecef4568d88da [diff] |
net: vlan: Avoid using BUG() in vlan_proto_idx() While we should always make sure that we specify a valid VLAN protocol to vlan_proto_idx(), killing the machine when an invalid value is specified is too harsh and not helpful for debugging. All callers are capable of dealing with an error returned by vlan_proto_idx() so check the index value and propagate it accordingly. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>