From: Roopa Prabhu Date: Fri, 6 Feb 2015 06:24:45 +0000 (-0800) Subject: bridge: add missing bridge port check for offloads X-Git-Tag: omap-for-v4.1/prcm-dts-mfd-syscon-fix~134^2~24 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1fd0bddb618aa970b87e7907a5703682aa119a6f;p=pandora-kernel.git bridge: add missing bridge port check for offloads This patch fixes a missing bridge port check caught by smatch. setlink/dellink of attributes like vlans can come for a bridge device and there is no need to offload those today. So, this patch adds a bridge port check. (In these cases however, the BRIDGE_SELF flags will always be set and we may not hit a problem with the current code). smatch complaint: The patch 68e331c785b8: "bridge: offload bridge port attributes to switch asic if feature flag set" from Jan 29, 2015, leads to the following Smatch complaint: net/bridge/br_netlink.c:552 br_setlink() error: we previously assumed 'p' could be null (see line 518) net/bridge/br_netlink.c 517 518 if (p && protinfo) { ^ Check for NULL. Reported-By: Dan Carpenter Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller --- Reading git-diff-tree failed