hwmon: qti_amoled_ecm: Suppress printing error logs for probe deferral

When active_panel is not available because of drm driver's probe
deferral, suppress printing error logs.

Change-Id: I210ff1ef79e468fef12b296c552e9611c2e888a8
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
This commit is contained in:
Subbaraman Narayanamurthy 2020-10-09 19:07:47 -07:00
commit 236c04e18a

View file

@ -759,7 +759,7 @@ static int amoled_ecm_parse_dt(struct amoled_ecm *ecm)
}
rc = amoled_ecm_parse_panel_dt(ecm);
if (rc < 0)
if (rc && rc != -EPROBE_DEFER)
pr_err("failed to get active panel, rc=%d\n", rc);
return rc;
@ -866,7 +866,9 @@ static int qti_amoled_ecm_probe(struct platform_device *pdev)
rc = amoled_ecm_parse_dt(ecm);
if (rc < 0) {
dev_err(&pdev->dev, "Failed to parse AMOLED ECM rc=%d\n", rc);
if (rc != -EPROBE_DEFER)
dev_err(&pdev->dev, "Failed to parse AMOLED ECM rc=%d\n",
rc);
return rc;
}