Re: [PATCH V4 net-bugfixs] net/ethernet: Update ret when ptp_clock is ERROR

From: Richard Cochran
Date: Thu Nov 12 2020 - 13:14:34 EST


On Thu, Nov 12, 2020 at 12:05:25PM +0200, Grygorii Strashko wrote:
> But, as Richard mentioned [1], ptp_clock_register() may return NULL even if PTP_1588_CLOCK=y
> (which I can't confirm neither deny - from the fast look at ptp_clock_register()
> code it seems should not return NULL)

This whole "implies" thing turned out to be a colossal PITA.

I regret the fact that it got merged. It wasn't my idea.

I will push back on playing games with the Kconfig settings. Even if
that happens to work for your particular driver, still the call site
of ptp_clock_register() must follow the correct pattern.

Why? Because others will copy/paste it.

Thanks,
Richard