]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-6.8/fbdev-viafb-fix-typo-in-hw_bitblt_1-and-hw_bitblt_2.patch
Linux 6.6.27
[thirdparty/kernel/stable-queue.git] / queue-6.8 / fbdev-viafb-fix-typo-in-hw_bitblt_1-and-hw_bitblt_2.patch
1 From 26766025ff4e94b546ac3c0e2cea87c5c8d4d53d Mon Sep 17 00:00:00 2001
2 From: Sasha Levin <sashal@kernel.org>
3 Date: Fri, 1 Mar 2024 14:35:43 +0300
4 Subject: fbdev: viafb: fix typo in hw_bitblt_1 and hw_bitblt_2
5
6 From: Aleksandr Burakov <a.burakov@rosalinux.ru>
7
8 [ Upstream commit bc87bb342f106a0402186bcb588fcbe945dced4b ]
9
10 There are some actions with value 'tmp' but 'dst_addr' is checked instead.
11 It is obvious that a copy-paste error was made here and the value
12 of variable 'tmp' should be checked here.
13
14 Found by Linux Verification Center (linuxtesting.org) with SVACE.
15
16 Signed-off-by: Aleksandr Burakov <a.burakov@rosalinux.ru>
17 Signed-off-by: Helge Deller <deller@gmx.de>
18 Signed-off-by: Sasha Levin <sashal@kernel.org>
19 ---
20 drivers/video/fbdev/via/accel.c | 4 ++--
21 1 file changed, 2 insertions(+), 2 deletions(-)
22
23 diff --git a/drivers/video/fbdev/via/accel.c b/drivers/video/fbdev/via/accel.c
24 index 0a1bc7a4d7853..1e04026f08091 100644
25 --- a/drivers/video/fbdev/via/accel.c
26 +++ b/drivers/video/fbdev/via/accel.c
27 @@ -115,7 +115,7 @@ static int hw_bitblt_1(void __iomem *engine, u8 op, u32 width, u32 height,
28
29 if (op != VIA_BITBLT_FILL) {
30 tmp = src_mem ? 0 : src_addr;
31 - if (dst_addr & 0xE0000007) {
32 + if (tmp & 0xE0000007) {
33 printk(KERN_WARNING "hw_bitblt_1: Unsupported source "
34 "address %X\n", tmp);
35 return -EINVAL;
36 @@ -260,7 +260,7 @@ static int hw_bitblt_2(void __iomem *engine, u8 op, u32 width, u32 height,
37 writel(tmp, engine + 0x18);
38
39 tmp = src_mem ? 0 : src_addr;
40 - if (dst_addr & 0xE0000007) {
41 + if (tmp & 0xE0000007) {
42 printk(KERN_WARNING "hw_bitblt_2: Unsupported source "
43 "address %X\n", tmp);
44 return -EINVAL;
45 --
46 2.43.0
47