mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-05 13:24:23 +08:00
drm/tve200: Fix smatch warning
The "ret" variable is ambiguously returning something that could be zero in the tve200_modeset_init() function, assign it an explicit error return code to make this unambiguous. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220505215019.2332613-1-linus.walleij@linaro.org
This commit is contained in:
parent
378e0f9f0b
commit
61a9fa154d
@ -64,7 +64,7 @@ static int tve200_modeset_init(struct drm_device *dev)
|
||||
struct tve200_drm_dev_private *priv = dev->dev_private;
|
||||
struct drm_panel *panel;
|
||||
struct drm_bridge *bridge;
|
||||
int ret = 0;
|
||||
int ret;
|
||||
|
||||
drm_mode_config_init(dev);
|
||||
mode_config = &dev->mode_config;
|
||||
@ -92,6 +92,7 @@ static int tve200_modeset_init(struct drm_device *dev)
|
||||
* method to get the connector out of the bridge.
|
||||
*/
|
||||
dev_err(dev->dev, "the bridge is not a panel\n");
|
||||
ret = -EINVAL;
|
||||
goto out_bridge;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user