summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/i40iw
diff options
context:
space:
mode:
authorHenry Orosco <henry.orosco@intel.com>2016-11-09 21:34:02 -0600
committerDoug Ledford <dledford@redhat.com>2016-12-05 16:09:37 -0500
commit5ebcb0ff54e594668e506583fa7344d101e3d05e (patch)
tree8e736ef5b784315096f96e32e58027f0302dded5 /drivers/infiniband/hw/i40iw
parente67791858e7b8d1389833386cb2dd0ca30d06862 (diff)
downloadlinux-5ebcb0ff54e594668e506583fa7344d101e3d05e.tar.bz2
i40iw: Use runtime check for IS_ENABLED(CONFIG_IPV6)
To be consistent, use the runtime check instead of conditional compile. Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com> Signed-off-by: Henry Orosco <henry.orosco@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/i40iw')
-rw-r--r--drivers/infiniband/hw/i40iw/i40iw_cm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/i40iw/i40iw_cm.c b/drivers/infiniband/hw/i40iw/i40iw_cm.c
index cbd77eb30385..b60e34653ec1 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_cm.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_cm.c
@@ -1583,9 +1583,10 @@ static enum i40iw_status_code i40iw_del_multiple_qhash(
static struct net_device *i40iw_netdev_vlan_ipv6(u32 *addr, u16 *vlan_id, u8 *mac)
{
struct net_device *ip_dev = NULL;
-#if IS_ENABLED(CONFIG_IPV6)
struct in6_addr laddr6;
+ if (!IS_ENABLED(CONFIG_IPV6))
+ return NULL;
i40iw_copy_ip_htonl(laddr6.in6_u.u6_addr32, addr);
if (vlan_id)
*vlan_id = I40IW_NO_VLAN;
@@ -1602,7 +1603,6 @@ static struct net_device *i40iw_netdev_vlan_ipv6(u32 *addr, u16 *vlan_id, u8 *ma
}
}
rcu_read_unlock();
-#endif
return ip_dev;
}