video: fbdev: sm712fb: Fix crash in smtcfb_write()
authorZheyu Ma <zheyuma97@gmail.com>
Wed, 2 Mar 2022 14:33:11 +0000 (22:33 +0800)
committerHelge Deller <deller@gmx.de>
Thu, 3 Mar 2022 10:13:40 +0000 (11:13 +0100)
commit4f01d09b2bbfbcb47b3eb305560a7f4857a32260
treec136d3112f10c039e0488f487beab4ddd662f5ed
parent961e366c85314c31a367fcf32fa944be64167d75
video: fbdev: sm712fb: Fix crash in smtcfb_write()

When the sm712fb driver writes three bytes to the framebuffer, the
driver will crash:

    BUG: unable to handle page fault for address: ffffc90001ffffff
    RIP: 0010:smtcfb_write+0x454/0x5b0
    Call Trace:
     vfs_write+0x291/0xd60
     ? do_sys_openat2+0x27d/0x350
     ? __fget_light+0x54/0x340
     ksys_write+0xce/0x190
     do_syscall_64+0x43/0x90
     entry_SYSCALL_64_after_hwframe+0x44/0xae

Fix it by removing the open-coded endianness fixup-code.

Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de>
drivers/video/fbdev/sm712fb.c