diff mbox series

video: fix Coverity missing break issue

Message ID 20200106220038.18773-1-agust@denx.de
State Accepted
Commit ab6ea931deeb8e435aeeb251bac7a2433e016271
Headers show
Series video: fix Coverity missing break issue | expand

Commit Message

Anatolij Gustschin Jan. 6, 2020, 10 p.m. UTC
Fix:
>>>  CID 280902:  Control flow issues  (MISSING_BREAK)
>>>  The case for value "VIDEO_BPP32" is not terminated
>>>  by a 'break' statement.

Reported-by: Tom Rini <trini at konsulko.com>
Signed-off-by: Anatolij Gustschin <agust at denx.de>
---
 drivers/video/vidconsole-uclass.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Simon Glass Jan. 9, 2020, 7:33 p.m. UTC | #1
On Mon, 6 Jan 2020 at 15:00, Anatolij Gustschin <agust at denx.de> wrote:
>
> Fix:
> >>>  CID 280902:  Control flow issues  (MISSING_BREAK)
> >>>  The case for value "VIDEO_BPP32" is not terminated
> >>>  by a 'break' statement.
>
> Reported-by: Tom Rini <trini at konsulko.com>
> Signed-off-by: Anatolij Gustschin <agust at denx.de>
> ---
>  drivers/video/vidconsole-uclass.c | 2 ++
>  1 file changed, 2 insertions(+)
>

Reviewed-by: Simon Glass <sjg at chromium.org>
Anatolij Gustschin Jan. 18, 2020, 11:26 a.m. UTC | #2
On Mon,  6 Jan 2020 23:00:38 +0100
Anatolij Gustschin agust at denx.de wrote:

> Fix:
> >>>  CID 280902:  Control flow issues  (MISSING_BREAK)
> >>>  The case for value "VIDEO_BPP32" is not terminated
> >>>  by a 'break' statement.  
> 
> Reported-by: Tom Rini <trini at konsulko.com>
> Signed-off-by: Anatolij Gustschin <agust at denx.de>
> ---
>  drivers/video/vidconsole-uclass.c | 2 ++
>  1 file changed, 2 insertions(+)

Applied to u-boot-video/master, thanks!

--
Anatolij
diff mbox series

Patch

diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c
index 75c7e25095..6c0daa1ee5 100644
--- a/drivers/video/vidconsole-uclass.c
+++ b/drivers/video/vidconsole-uclass.c
@@ -144,12 +144,14 @@  u32 vid_console_color(struct video_priv *priv, unsigned int idx)
 			       ((colors[idx].g >> 2) <<  5) |
 			       ((colors[idx].b >> 3) <<  0);
 		}
+		break;
 	case VIDEO_BPP32:
 		if (CONFIG_IS_ENABLED(VIDEO_BPP32)) {
 			return (colors[idx].r << 16) |
 			       (colors[idx].g <<  8) |
 			       (colors[idx].b <<  0);
 		}
+		break;
 	default:
 		/*
 		 * For unknown bit arrangements just support