diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2022-05-06 00:50:19 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2022-08-26 15:22:59 +0300 |
commit | 61a9fa154d217c13eea90aa5bc635bc4b1fcb66e (patch) | |
tree | 3e9e2bc0ec51688a336bc550496fa539291ed18f /drivers/gpu/drm/tve200/tve200_drv.c | |
parent | 378e0f9f0b3e03a84db5ed5d3da3850871e9209e (diff) | |
download | linux-61a9fa154d217c13eea90aa5bc635bc4b1fcb66e.tar.xz |
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
Diffstat (limited to 'drivers/gpu/drm/tve200/tve200_drv.c')
-rw-r--r-- | drivers/gpu/drm/tve200/tve200_drv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tve200/tve200_drv.c b/drivers/gpu/drm/tve200/tve200_drv.c index 79d790ae1670..04db72e3fa9c 100644 --- a/drivers/gpu/drm/tve200/tve200_drv.c +++ b/drivers/gpu/drm/tve200/tve200_drv.c @@ -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; } |