diff options
Diffstat (limited to 'include/linux/if_vlan.h')
-rw-r--r-- | include/linux/if_vlan.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 79504b22a932..edd55af7ebd6 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
@@ -93,7 +93,7 @@ static inline struct net_device *vlan_group_get_device(struct vlan_group *vg, | |||
93 | { | 93 | { |
94 | struct net_device **array; | 94 | struct net_device **array; |
95 | array = vg->vlan_devices_arrays[vlan_id / VLAN_GROUP_ARRAY_PART_LEN]; | 95 | array = vg->vlan_devices_arrays[vlan_id / VLAN_GROUP_ARRAY_PART_LEN]; |
96 | return array[vlan_id % VLAN_GROUP_ARRAY_PART_LEN]; | 96 | return array ? array[vlan_id % VLAN_GROUP_ARRAY_PART_LEN] : NULL; |
97 | } | 97 | } |
98 | 98 | ||
99 | static inline void vlan_group_set_device(struct vlan_group *vg, | 99 | static inline void vlan_group_set_device(struct vlan_group *vg, |