drm: bridge: simple-bridge: Use dev_err_probe()
Replace the open-code with dev_err_probe() to simplify the code. Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/202303221622511915615@zte.com.cn
This commit is contained in:
parent
ed8f4e1002
commit
db8496d0b5
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user