I'd ignore that path, it's just special casing that's supposed to keepI've implemented this checker couple of months ago. The latest smatch (v1.72) should warn about this type of bugs. All reported bugs are fixed already :)
the driver-visible API sane. Nobody should be touching netdev past
free_netdev(). Actually if you can it'd be interesting to add checks
for using whatever netdev_priv(ndev) returned past free_netdev(ndev).
Most UAFs that come to mind from the past were people doing something
like:
struct my_priv *mine = netdev_priv(ndev);
netdev_unregister(ndev);
free_netdev(ndev);
free(mine->bla); /* UAF, free_netdev() frees the priv */