diff options
author | NĂcolas F. R. A. Prado <nfraprado@collabora.com> | 2022-07-12 17:45:54 -0400 |
---|---|---|
committer | Prashant Malani <pmalani@chromium.org> | 2022-07-13 17:28:17 +0000 |
commit | ce838f7dc7957afb2846c3bc537db56e4c513390 (patch) | |
tree | a5949ebda4b779d676d28d61f678731b7af0926d /drivers/platform/chrome | |
parent | 3de7203115af2f3a76ffdb0c90a89ad99f4c4e04 (diff) | |
download | linux-ce838f7dc7957afb2846c3bc537db56e4c513390.tar.bz2 |
platform/chrome: cros_ec_typec: Use dev_err_probe on port register fail
The typec_register_port() can fail with EPROBE_DEFER if the endpoint
node hasn't probed yet. In order to avoid spamming the log with errors
in that case, log using dev_err_probe().
Signed-off-by: NĂcolas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220712214554.545035-1-nfraprado@collabora.com
Signed-off-by: Prashant Malani <pmalani@chromium.org>
Diffstat (limited to 'drivers/platform/chrome')
-rw-r--r-- | drivers/platform/chrome/cros_ec_typec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c index d6088ba447af..8c0ca3c128ee 100644 --- a/drivers/platform/chrome/cros_ec_typec.c +++ b/drivers/platform/chrome/cros_ec_typec.c @@ -352,8 +352,8 @@ static int cros_typec_init_ports(struct cros_typec_data *typec) cros_port->port = typec_register_port(dev, cap); if (IS_ERR(cros_port->port)) { - dev_err(dev, "Failed to register port %d\n", port_num); ret = PTR_ERR(cros_port->port); + dev_err_probe(dev, ret, "Failed to register port %d\n", port_num); goto unregister_ports; } |