Thread (18 messages) flat view 18 messages, 5 authors, 2020-11-14

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

From: Richard Cochran <richardcochran@gmail.com>
Date: 2020-11-11 12:32:37
Also in: lkml

On Wed, Nov 11, 2020 at 05:24:41PM +0800, Wang Qing wrote:
We always have to update the value of ret, otherwise the error value
 may be the previous one. And ptp_clock_register() never return NULL
 when PTP_1588_CLOCK enable.
NAK.

Your code must handle the possibility that ptp_clock_register() can
return NULL.  Why?

1. Because that follows the documented API.

2. Because people will copy/paste this driver.

3. Because the Kconfig for your driver can change without warning.

Thanks,
Richard
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help