]> git.baikalelectronics.ru Git - kernel.git/commit
bridge: remove unnecessary check for vtbegin in br_fill_vlan_tinfo_range
authorRoopa Prabhu <roopa@cumulusnetworks.com>
Tue, 7 Feb 2017 14:43:23 +0000 (06:43 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Feb 2017 19:14:12 +0000 (14:14 -0500)
commit200134d6bccb73d0bc9e37485012d54c14a59df6
treea2b14db32bd6ddd64a08aaa82a4c8188dd5b8861
parent8c172f906054ca573ba43bf149680560a39d1e17
bridge: remove unnecessary check for vtbegin in br_fill_vlan_tinfo_range

vtbegin should not be NULL in this function, Its already checked by the
caller.

this should silence the below smatch complaint:
  net/bridge/br_netlink_tunnel.c:144 br_fill_vlan_tinfo_range()
    error: we previously assumed 'vtbegin' could be null (see line 130)

net/bridge/br_netlink_tunnel.c
   129
   130      if (vtbegin && vtend && (vtend->vid - vtbegin->vid) > 0) {
                    ^^^^^^^
Check for NULL.

Fixes: 45c3d2f660a8 ("bridge: per vlan dst_metadata netlink support")
Reported-By: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_netlink_tunnel.c