net: vlan: Fixed signedness in vlan_group_prealloc_vid()
Subsystems (2)
PATCH 1/1 net: vlan: Fixed signedness in vlan_group_prealloc_vid()
After commit d0186842ec5f ("net: vlan: Avoid using BUG() in vlan_proto_idx()"), vlan_proto_idx() was changed to return a signed integer, however one of its called: vlan_group_prealloc_vid() was still using an unsigned integer for its return value, fix that.
Fixes d0186842ec5f ("net: vlan: Avoid using BUG() in vlan_proto_idx()")
Reported-by kernel test robot <[email protected]>
Signed-off-by Florian Fainelli <[email protected]>
--- net/8021q/vlan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/8021q/vlan.c +2 -1
@@ -51,8 +51,9 @@ static int vlan_group_prealloc_vid(struct vlan_group *vg, __be16 vlan_proto, u16 vlan_id) {struct net_device **array; -unsigned int pidx, vidx; +unsigned int vidx;unsigned int size; +int pidx;ASSERT_RTNL ();
Signature · 1 line
2.25.1
From: Florian Fainelli <[email protected]>
Date: Sun, 27 Sep 2020 19:31:50 -0700
Quoted 8 lines
After commit
d0186842ec5f("net: vlan: Avoid usingBUG()invlan_proto_idx()"),vlan_proto_idx()was changed to return a signed integer, however one of its called:vlan_group_prealloc_vid()was still using an unsigned integer for its return value, fix that.Fixes d0186842ec5f ("net: vlan: Avoid using BUG() in vlan_proto_idx()")Reported-by kernel test robot <[email protected]>Signed-off-by Florian Fainelli <[email protected]>
Applied, thanks Florian.