Skip to content

Commit 2b055bf

Browse files
bebarinoTzung-Bi Shih
authored andcommitted
platform/chrome: cros_ec_typec: Use dev_err_probe() more
There's some debug prints here that can be upgraded to dev_err_probe() so that we don't have to fish out the error messages when a true error happens. If they're simply probe defers then the kernel will keep silent but if they're true errors we'll see the errors in the logs. Cc: Prashant Malani <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Acked-by: Prashant Malani <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Tzung-Bi Shih <[email protected]>
1 parent a88f6ef commit 2b055bf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/platform/chrome/cros_ec_typec.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,28 +80,28 @@ static int cros_typec_get_switch_handles(struct cros_typec_port *port,
8080
port->mux = fwnode_typec_mux_get(fwnode);
8181
if (IS_ERR(port->mux)) {
8282
ret = PTR_ERR(port->mux);
83-
dev_dbg(dev, "Mux handle not found: %d.\n", ret);
83+
dev_err_probe(dev, ret, "Mux handle not found\n");
8484
goto mux_err;
8585
}
8686

8787
port->retimer = fwnode_typec_retimer_get(fwnode);
8888
if (IS_ERR(port->retimer)) {
8989
ret = PTR_ERR(port->retimer);
90-
dev_dbg(dev, "Retimer handle not found: %d.\n", ret);
90+
dev_err_probe(dev, ret, "Retimer handle not found\n");
9191
goto retimer_sw_err;
9292
}
9393

9494
port->ori_sw = fwnode_typec_switch_get(fwnode);
9595
if (IS_ERR(port->ori_sw)) {
9696
ret = PTR_ERR(port->ori_sw);
97-
dev_dbg(dev, "Orientation switch handle not found: %d\n", ret);
97+
dev_err_probe(dev, ret, "Orientation switch handle not found\n");
9898
goto ori_sw_err;
9999
}
100100

101101
port->role_sw = fwnode_usb_role_switch_get(fwnode);
102102
if (IS_ERR(port->role_sw)) {
103103
ret = PTR_ERR(port->role_sw);
104-
dev_dbg(dev, "USB role switch handle not found: %d\n", ret);
104+
dev_err_probe(dev, ret, "USB role switch handle not found\n");
105105
goto role_sw_err;
106106
}
107107

0 commit comments

Comments
 (0)