Skip to content

Commit

Permalink
ptp: ocp: Report error if resource registration fails.
Browse files Browse the repository at this point in the history
If a resource could not be registered, report the name of
the resource and the error code.

Signed-off-by: Jonathan Lemon <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
jlemon authored and davem330 committed Sep 15, 2021
1 parent 56ec440 commit bceff29
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/ptp/ptp_ocp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit bceff29

Please sign in to comment.