]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/ast: fix missing break in switch statement for format->cpp[0] case 4
authorColin Ian King <colin.king@canonical.com>
Wed, 10 Jun 2020 11:58:04 +0000 (12:58 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:49:09 +0000 (17:49 +0200)
commitbfbdc124a83446df7f4907554b12fcae5c348834
tree43f9001a22a8faf55974cf38ab287f1b9a82e16b
parent1e84f34bb61a6393631add3edba806c800d9ff7c
drm/ast: fix missing break in switch statement for format->cpp[0] case 4

[ Upstream commit 291ddeb621e4a9f1ced8302a777fbd7fbda058c6 ]

Currently the switch statement for format->cpp[0] value 4 assigns
color_index which is never read again and then falls through to the
default case and returns. This looks like a missing break statement
bug. Fix this by adding a break statement.

Addresses-Coverity: ("Unused value")
Fixes: 259d14a76a27 ("drm/ast: Split ast_set_vbios_mode_info()")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Tested-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20200610115804.1132338-1-colin.king@canonical.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/ast/ast_mode.c