On Wed, Apr 4, 2018 at 9:53 AM, Shannon Nelson <shannon.nel...@oracle.com> wrote: > On 4/3/2018 2:16 PM, Alexander Duyck wrote: > > [...] >> >> +static inline void *macvlan_accel_priv(struct net_device *dev) >> +{ >> + struct macvlan_dev *macvlan = netdev_priv(dev); >> + >> + return macvlan->accel_priv; > > > Perhaps a check for (macvlan == NULL) before using it? > sln > >
The macvlan pointer cannot be NULL.The netdev_priv() function adds an offset to the dev pointer. So I would have to be checking for a NULL netdev. If the netdev was NULL then there was probably no point in calling this function in the first place. - Alex