net: vlan: Fixed signedness in vlan_group_prealloc_vid()
authorFlorian Fainelli <f.fainelli@gmail.com>
Mon, 28 Sep 2020 02:31:50 +0000 (19:31 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Sep 2020 07:51:39 +0000 (00:51 -0700)
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 <lkp@intel.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/8021q/vlan.c

index 6c08de1..f292e02 100644 (file)
@@ -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();