lkml.org 
[lkml]   [2020]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2020-11-07 16:08    [W:0.067 / U:0.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site