Skip to content

Commit 0f2d5ec

Browse files
committed
net/vlan: make a judgment before calling fuction
Make a judgment before calling fuction. Signed-off-by: gaohedong <[email protected]>
1 parent 4a06935 commit 0f2d5ec

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/net/vlan.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,10 @@ static void vlan_reclaim(FAR struct netdev_lowerhalf_s *dev)
250250
FAR struct vlan_device_s *vlan = (FAR struct vlan_device_s *)dev;
251251
FAR struct netdev_lowerhalf_s *real = vlan->real;
252252

253-
real->ops->reclaim(real);
253+
if (real->ops->reclaim)
254+
{
255+
real->ops->reclaim(real);
256+
}
254257
}
255258

256259
/****************************************************************************

0 commit comments

Comments
 (0)