dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/mcde: Fix uninitialized value
@ 2020-11-19 14:07 Linus Walleij
  2020-11-23 21:37 ` Sam Ravnborg
  0 siblings, 1 reply; 2+ messages in thread
From: Linus Walleij @ 2020-11-19 14:07 UTC (permalink / raw)
  To: dri-devel, Maarten Lankhorst, Maxime Ripard, Sean Paul
  Cc: Dan Carpenter, kernel test robot, linux-arm-kernel

"val" isn't initialized on the default: errorpath.
Just return from the function if this happens.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/gpu/drm/mcde/mcde_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/mcde/mcde_display.c b/drivers/gpu/drm/mcde/mcde_display.c
index 192e11c88d72..d941026b940c 100644
--- a/drivers/gpu/drm/mcde/mcde_display.c
+++ b/drivers/gpu/drm/mcde/mcde_display.c
@@ -569,7 +569,7 @@ static void mcde_configure_channel(struct mcde *mcde, enum mcde_channel ch,
 	default:
 		dev_err(mcde->dev, "unknown flow mode %d\n",
 			mcde->flow_mode);
-		break;
+		return;
 	}
 
 	writel(val, mcde->regs + sync);
-- 
2.26.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/mcde: Fix uninitialized value
  2020-11-19 14:07 [PATCH] drm/mcde: Fix uninitialized value Linus Walleij
@ 2020-11-23 21:37 ` Sam Ravnborg
  0 siblings, 0 replies; 2+ messages in thread
From: Sam Ravnborg @ 2020-11-23 21:37 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-arm-kernel, kernel test robot, dri-devel, Sean Paul, Dan Carpenter

On Thu, Nov 19, 2020 at 03:07:07PM +0100, Linus Walleij wrote:
> "val" isn't initialized on the default: errorpath.
> Just return from the function if this happens.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>

In the same function - it looks like a bug that the code
returns when it sees a MCDE_CHANNEL_3 - line 524.

	Sam
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-23 21:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-19 14:07 [PATCH] drm/mcde: Fix uninitialized value Linus Walleij
2020-11-23 21:37 ` Sam Ravnborg

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).