usb: dwc3: qcom: use dev_err_probe() where appropriate
Update to using dev_err_probe() throughout to reduce spam and log useful information in devices_deferred. Signed-off-by: Andrew Halaney <ahalaney@redhat.com> Message-ID: <20230605193625.63187-1-ahalaney@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
4a944da707
commit
60d5b71933
|
@ -167,7 +167,8 @@ static int dwc3_qcom_register_extcon(struct dwc3_qcom *qcom)
|
|||
|
||||
qcom->edev = extcon_get_edev_by_phandle(dev, 0);
|
||||
if (IS_ERR(qcom->edev))
|
||||
return PTR_ERR(qcom->edev);
|
||||
return dev_err_probe(dev, PTR_ERR(qcom->edev),
|
||||
"Failed to get extcon\n");
|
||||
|
||||
qcom->vbus_nb.notifier_call = dwc3_qcom_vbus_notifier;
|
||||
|
||||
|
@ -252,16 +253,14 @@ static int dwc3_qcom_interconnect_init(struct dwc3_qcom *qcom)
|
|||
|
||||
qcom->icc_path_ddr = of_icc_get(dev, "usb-ddr");
|
||||
if (IS_ERR(qcom->icc_path_ddr)) {
|
||||
dev_err(dev, "failed to get usb-ddr path: %ld\n",
|
||||
PTR_ERR(qcom->icc_path_ddr));
|
||||
return PTR_ERR(qcom->icc_path_ddr);
|
||||
return dev_err_probe(dev, PTR_ERR(qcom->icc_path_ddr),
|
||||
"failed to get usb-ddr path\n");
|
||||
}
|
||||
|
||||
qcom->icc_path_apps = of_icc_get(dev, "apps-usb");
|
||||
if (IS_ERR(qcom->icc_path_apps)) {
|
||||
dev_err(dev, "failed to get apps-usb path: %ld\n",
|
||||
PTR_ERR(qcom->icc_path_apps));
|
||||
ret = PTR_ERR(qcom->icc_path_apps);
|
||||
ret = dev_err_probe(dev, PTR_ERR(qcom->icc_path_apps),
|
||||
"failed to get apps-usb path\n");
|
||||
goto put_path_ddr;
|
||||
}
|
||||
|
||||
|
@ -813,9 +812,8 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
|
|||
|
||||
qcom->resets = devm_reset_control_array_get_optional_exclusive(dev);
|
||||
if (IS_ERR(qcom->resets)) {
|
||||
ret = PTR_ERR(qcom->resets);
|
||||
dev_err(&pdev->dev, "failed to get resets, err=%d\n", ret);
|
||||
return ret;
|
||||
return dev_err_probe(&pdev->dev, PTR_ERR(qcom->resets),
|
||||
"failed to get resets\n");
|
||||
}
|
||||
|
||||
ret = reset_control_assert(qcom->resets);
|
||||
|
@ -834,7 +832,7 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
|
|||
|
||||
ret = dwc3_qcom_clk_init(qcom, of_clk_get_parent_count(np));
|
||||
if (ret) {
|
||||
dev_err(dev, "failed to get clocks\n");
|
||||
dev_err_probe(dev, ret, "failed to get clocks\n");
|
||||
goto reset_assert;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue