* [PATCH] drm/tve200: Fix smatch warning
@ 2022-05-05 21:50 Linus Walleij
2022-08-26 11:35 ` Linus Walleij
0 siblings, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2022-05-05 21:50 UTC (permalink / raw)
To: dri-devel, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann
Cc: Dan Carpenter, linux-arm-kernel
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>
---
drivers/gpu/drm/tve200/tve200_drv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/tve200/tve200_drv.c b/drivers/gpu/drm/tve200/tve200_drv.c
index 6d9d2921abf4..3f4fef574706 100644
--- a/drivers/gpu/drm/tve200/tve200_drv.c
+++ b/drivers/gpu/drm/tve200/tve200_drv.c
@@ -65,7 +65,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;
@@ -93,6 +93,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;
}
--
2.35.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/tve200: Fix smatch warning
2022-05-05 21:50 [PATCH] drm/tve200: Fix smatch warning Linus Walleij
@ 2022-08-26 11:35 ` Linus Walleij
2022-08-26 12:05 ` Dan Carpenter
0 siblings, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2022-08-26 11:35 UTC (permalink / raw)
To: dri-devel, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann
Cc: Dan Carpenter, linux-arm-kernel
On Thu, May 5, 2022 at 11:52 PM Linus Walleij <linus.walleij@linaro.org> wrote:
> 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>
Would someone show mercy on this patch and review it so I
can apply it?
Dan maybe? If it solves the problem you reported.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/tve200: Fix smatch warning
2022-08-26 11:35 ` Linus Walleij
@ 2022-08-26 12:05 ` Dan Carpenter
2022-08-26 12:23 ` Linus Walleij
0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2022-08-26 12:05 UTC (permalink / raw)
To: Linus Walleij; +Cc: linux-arm-kernel, Thomas Zimmermann, dri-devel
On Fri, Aug 26, 2022 at 01:35:56PM +0200, Linus Walleij wrote:
> On Thu, May 5, 2022 at 11:52 PM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> > 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>
>
> Would someone show mercy on this patch and review it so I
> can apply it?
>
> Dan maybe? If it solves the problem you reported.
Yes. This patch makes me happy. Thanks!
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
regards,
dan carpenter
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/tve200: Fix smatch warning
2022-08-26 12:05 ` Dan Carpenter
@ 2022-08-26 12:23 ` Linus Walleij
0 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2022-08-26 12:23 UTC (permalink / raw)
To: Dan Carpenter; +Cc: linux-arm-kernel, Thomas Zimmermann, dri-devel
On Fri, Aug 26, 2022 at 2:05 PM Dan Carpenter <dan.carpenter@oracle.com> wrote:
> On Fri, Aug 26, 2022 at 01:35:56PM +0200, Linus Walleij wrote:
> > On Thu, May 5, 2022 at 11:52 PM Linus Walleij <linus.walleij@linaro.org> wrote:
> >
> > > 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>
> >
> > Would someone show mercy on this patch and review it so I
> > can apply it?
> >
> > Dan maybe? If it solves the problem you reported.
>
> Yes. This patch makes me happy. Thanks!
>
> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Excellent, patch applied!
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-08-26 12:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-05 21:50 [PATCH] drm/tve200: Fix smatch warning Linus Walleij
2022-08-26 11:35 ` Linus Walleij
2022-08-26 12:05 ` Dan Carpenter
2022-08-26 12:23 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).