> +struct mii_timestamper *register_mii_timestamper(struct device_node *node, > + unsigned int port) > +{ > + struct mii_timestamper *mii_ts = NULL; > + struct mii_timestamping_desc *desc; > + struct list_head *this; > + > + mutex_lock(&tstamping_devices_lock); > + list_for_each(this, &mii_timestamping_devices) { > + desc = list_entry(this, struct mii_timestamping_desc, list); > + if (desc->device->of_node == node) { > + mii_ts = desc->ctrl->probe_channel(desc->device, port); > + if (mii_ts) { > + mii_ts->device = desc->device; > + get_device(desc->device); > + * @probe_channel: Callback into the controller driver announcing the > + * presence of the 'port' channel. The 'device' field > + * had been passed to register_mii_tstamp_controller(). > + * The driver must return either a pointer to a valid > + * MII timestamper instance or PTR_ERR. Hi Richard probe_channel returns an PTR_ERR. So if (mii_ts) should probably be if (IS_ERR(mii_ts)) Andrew