Skip to content
Commit aea0a897 authored by YueHaibing's avatar YueHaibing Committed by David S. Miller
Browse files

ptp: Fix pass zero to ERR_PTR() in ptp_clock_register

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: 85a66e55

 ("ptp: create "pins" together with the rest of attributes")
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Acked-by: default avatarRichard Cochran <richardcochran@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 06d21290
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment