On Tue, Mar 14, 2023 at 07:16:28AM +0000, Zhang, Tianfei wrote: > > Need to handle NULL as well... > > It looks like that it doesn't need check NULL for ptp_clock_register(), it handle the NULL case internally and return ERR_PTR(-ENOMEM). You aren't looking in the right place. Go back and READ the KernelDoc that I posted and you cut from your reply. Thanks, Richard