From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next] bridge: remove unnecessary check for vtbegin in br_fill_vlan_tinfo_range Date: Tue, 07 Feb 2017 14:14:30 -0500 (EST) Message-ID: <20170207.141430.837924902975646212.davem@davemloft.net> References: <1486478603-38776-1-git-send-email-roopa@cumulusnetworks.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: nikolay@cumulusnetworks.com, netdev@vger.kernel.org, bridge@lists.linux-foundation.org, dan.carpenter@oracle.com To: roopa@cumulusnetworks.com Return-path: In-Reply-To: <1486478603-38776-1-git-send-email-roopa@cumulusnetworks.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: bridge-bounces@lists.linux-foundation.org Errors-To: bridge-bounces@lists.linux-foundation.org List-Id: netdev.vger.kernel.org From: Roopa Prabhu Date: Tue, 7 Feb 2017 06:43:23 -0800 > From: Roopa Prabhu > > 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: efa5356b0d97 ("bridge: per vlan dst_metadata netlink support") > Reported-By: Dan Carpenter > Signed-off-by: Roopa Prabhu Applied.