Re: [PATCH net-next v7 2/5] net: phy: microchip_rds_ptp : Add rds ptp library for Microchip phys

From: Richard Cochran
Date: Tue Dec 17 2024 - 22:47:33 EST


On Tue, Dec 17, 2024 at 07:22:46PM -0800, Jakub Kicinski wrote:
> On Fri, 13 Dec 2024 17:44:00 +0530 Divya Koppera wrote:
> > +
> > +static int mchp_rds_ptp_ts_info(struct mii_timestamper *mii_ts,
> > + struct kernel_ethtool_ts_info *info)
> > +{
> > + struct mchp_rds_ptp_clock *clock = container_of(mii_ts,
> > + struct mchp_rds_ptp_clock,
> > + mii_ts);
> > +
> > + info->phc_index =
> > + clock->ptp_clock ? ptp_clock_index(clock->ptp_clock) : -1;
>
> under what condition can the clock be NULL?

ptp_clock_register() can return PTR_ERR or null.

Thanks,
Richard