summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/ptp/ptp_clock.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/ptp/ptp_clock.c b/drivers/ptp/ptp_clock.c
index 5419a89d300e..b052b14c2a50 100644
--- a/drivers/ptp/ptp_clock.c
+++ b/drivers/ptp/ptp_clock.c
@@ -260,7 +260,8 @@ struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info,
pps.mode = PTP_PPS_MODE;
pps.owner = info->owner;
ptp->pps_source = pps_register_source(&pps, PTP_PPS_DEFAULTS);
- if (!ptp->pps_source) {
+ if (IS_ERR(ptp->pps_source)) {
+ err = PTR_ERR(ptp->pps_source);
pr_err("failed to register pps source\n");
goto no_pps;
}