diff options
author | Ye Xingchen <ye.xingchen@zte.com.cn> | 2023-03-22 16:22:51 +0800 |
---|---|---|
committer | Neil Armstrong <neil.armstrong@linaro.org> | 2023-03-22 11:51:30 +0100 |
commit | db8496d0b50519540e1ee50f7e209b3a536ed671 (patch) | |
tree | fa3018b61c0d96a0619544c170a4310bf624d7de /drivers/gpu/drm/bridge | |
parent | ed8f4e1002781c47813e4e2b37ad15b927fd8b67 (diff) | |
download | linux-stable-db8496d0b50519540e1ee50f7e209b3a536ed671.tar.gz linux-stable-db8496d0b50519540e1ee50f7e209b3a536ed671.tar.bz2 linux-stable-db8496d0b50519540e1ee50f7e209b3a536ed671.zip |
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
Diffstat (limited to 'drivers/gpu/drm/bridge')
-rw-r--r-- | drivers/gpu/drm/bridge/simple-bridge.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/drm/bridge/simple-bridge.c b/drivers/gpu/drm/bridge/simple-bridge.c index 5ede3e111096..d85d9ee463b8 100644 --- a/drivers/gpu/drm/bridge/simple-bridge.c +++ b/drivers/gpu/drm/bridge/simple-bridge.c @@ -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; |