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

drm: bridge: simple-bridge: 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/202303221622511915615@zte.com.cn
parent ed8f4e10
......@@ -202,11 +202,9 @@ static int simple_bridge_probe(struct platform_device *pdev)
sbridge->enable = devm_gpiod_get_optional(&pdev->dev, "enable",
GPIOD_OUT_LOW);
if (IS_ERR(sbridge->enable)) {
if (PTR_ERR(sbridge->enable) != -EPROBE_DEFER)
dev_err(&pdev->dev, "Unable to retrieve enable GPIO\n");
return PTR_ERR(sbridge->enable);
}
if (IS_ERR(sbridge->enable))
return dev_err_probe(&pdev->dev, PTR_ERR(sbridge->enable),
"Unable to retrieve enable GPIO\n");
/* Register the bridge. */
sbridge->bridge.funcs = &simple_bridge_bridge_funcs;
......
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