> > +static int ethnl_cable_test_started(struct phy_device *phydev) > > +{ > > + struct sk_buff *skb; > > + int err = -ENOMEM; > > + void *ehdr; > > + > > + skb = genlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL); > > + if (!skb) > > + goto out; > > + > > + ehdr = ethnl_bcastmsg_put(skb, ETHTOOL_MSG_CABLE_TEST_NTF); > > + if (!ehdr) { > > + err = -EINVAL; > > This should rather be -EMSGSIZE. But as we are not going to use the > return value anyway, it's only cosmetic problem.
Yes, cut/paste from the alloc function. I might put a phydev_err() in out: so we get to know about errors. Andrew