summaryrefslogtreecommitdiffstats
path: root/drivers/ptp
diff options
context:
space:
mode:
authorJonathan Lemon <jonathan.lemon@gmail.com>2021-09-14 19:16:23 -0700
committerDavid S. Miller <davem@davemloft.net>2021-09-15 11:10:00 +0100
commitbceff2905eff5d91de07a6be7617341f36716224 (patch)
treee947b4ed18da0289c1a05b54030dc2736ddb02c5 /drivers/ptp
parent56ec44033cd7398cc450fe3d356aa2b5a035e423 (diff)
downloadlinux-bceff2905eff5d91de07a6be7617341f36716224.tar.bz2
ptp: ocp: Report error if resource registration fails.
If a resource could not be registered, report the name of the resource and the error code. Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/ptp')
-rw-r--r--drivers/ptp/ptp_ocp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c
index ad8b794fa7e6..1f86e878ccba 100644
--- a/drivers/ptp/ptp_ocp.c
+++ b/drivers/ptp/ptp_ocp.c
@@ -1158,8 +1158,12 @@ ptp_ocp_register_resources(struct ptp_ocp *bp, kernel_ulong_t driver_data)
if (!ptp_ocp_allow_irq(bp, r))
continue;
err = r->setup(bp, r);
- if (err)
+ if (err) {
+ dev_err(&bp->pdev->dev,
+ "Could not register %s: err %d\n",
+ r->name, err);
break;
+ }
}
return err;
}