diff options
author | Yifeng Li <tomli@tomli.me> | 2019-04-02 17:14:10 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-05-25 18:23:48 +0200 |
commit | fcac71697a15061ebf2694d4258bde5be6d85a72 (patch) | |
tree | 1d5192edc16a2094bc03f9bf9fa4ed26f805c65c /drivers/video | |
parent | 107e215c2962c00c79351b4bfc2d3c0fe7df50f6 (diff) | |
download | linux-stable-fcac71697a15061ebf2694d4258bde5be6d85a72.tar.gz linux-stable-fcac71697a15061ebf2694d4258bde5be6d85a72.tar.bz2 linux-stable-fcac71697a15061ebf2694d4258bde5be6d85a72.zip |
fbdev: sm712fb: fix memory frequency by avoiding a switch/case fallthrough
commit 9dc20113988b9a75ea6b3abd68dc45e2d73ccdab upstream.
A fallthrough in switch/case was introduced in f627caf55b8e ("fbdev:
sm712fb: fix crashes and garbled display during DPMS modesetting"),
due to my copy-paste error, which would cause the memory clock frequency
for SM720 to be programmed to SM712.
Since it only reprograms the clock to a different frequency, it's only
a benign issue without visible side-effect, so it also evaded Sudip
Mukherjee's code review and regression tests. scripts/checkpatch.pl
also failed to discover the issue, possibly due to nested switch
statements.
This issue was found by Stephen Rothwell by building linux-next with
-Wimplicit-fallthrough.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Fixes: f627caf55b8e ("fbdev: sm712fb: fix crashes and garbled display during DPMS modesetting")
Signed-off-by: Yifeng Li <tomli@tomli.me>
Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fbdev/sm712fb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/video/fbdev/sm712fb.c b/drivers/video/fbdev/sm712fb.c index 1e2503b52c6f..f1dcc6766d1e 100644 --- a/drivers/video/fbdev/sm712fb.c +++ b/drivers/video/fbdev/sm712fb.c @@ -898,6 +898,7 @@ static int smtc_blank(int blank_mode, struct fb_info *info) case 0x712: smtc_seqw(0x6a, 0x16); smtc_seqw(0x6b, 0x02); + break; case 0x720: smtc_seqw(0x6a, 0x0d); smtc_seqw(0x6b, 0x02); |