Messages in this thread | | | Date | Sat, 7 Nov 2020 07:07:02 -0800 | From | Richard Cochran <> | Subject | Re: [PATCH] net/ethernet: update ret when ptp_clock is ERROR |
| |
On Fri, Nov 06, 2020 at 01:34:04PM +0200, Grygorii Strashko wrote: > And ptp_clock_register() can return NULL only if PTP support is disabled.
Not true in general ...
> In which case, we should not even get here.
only because the Kconfig uses "depends on" instead of "implies" PTP_1588_CLOCK.
> So, I'd propose to s/IS_ERR_OR_NULL/IS_ERR above, > and just assign ret = PTR_ERR(cpts->ptp_clock) here.
No, please no -- don't make another bad example for people to copy/paste.
Thanks, Richard
| |