Commit ed8f4e10 authored by Ye Xingchen's avatar Ye Xingchen Committed by Neil Armstrong

drm/bridge: display-connector: Use dev_err_probe()

Replace the open-code with dev_err_probe() to simplify the code.
Signed-off-by: default avatarYe Xingchen <ye.xingchen@zte.com.cn>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarNeil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/202303221621336645576@zte.com.cn
parent 5519fea9
......@@ -271,12 +271,9 @@ static int display_connector_probe(struct platform_device *pdev)
type == DRM_MODE_CONNECTOR_DisplayPort) {
conn->hpd_gpio = devm_gpiod_get_optional(&pdev->dev, "hpd",
GPIOD_IN);
if (IS_ERR(conn->hpd_gpio)) {
if (PTR_ERR(conn->hpd_gpio) != -EPROBE_DEFER)
dev_err(&pdev->dev,
if (IS_ERR(conn->hpd_gpio))
return dev_err_probe(&pdev->dev, PTR_ERR(conn->hpd_gpio),
"Unable to retrieve HPD GPIO\n");
return PTR_ERR(conn->hpd_gpio);
}
conn->hpd_irq = gpiod_to_irq(conn->hpd_gpio);
} else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment