Re: [PATCH v2 net-next] ptp: Fix pass zero to ERR_PTR() in ptp_clock_register

From: David Miller
Date: Fri Nov 23 2018 - 21:04:28 EST


From: YueHaibing <yuehaibing@xxxxxxxxxx>
Date: Fri, 23 Nov 2018 09:54:55 +0800

> Fix smatch warning:
>
> drivers/ptp/ptp_clock.c:298 ptp_clock_register() warn:
> passing zero to 'ERR_PTR'
>
> 'err' should be set while device_create_with_groups and
> pps_register_source fails
>
> Fixes: 85a66e550195 ("ptp: create "pins" together with the rest of attributes")
> Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx>

Applied.