fbdev: viafb: fix typo in hw_bitblt_1 and hw_bitblt_2
authorAleksandr Burakov <a.burakov@rosalinux.ru>
Fri, 1 Mar 2024 11:35:43 +0000 (14:35 +0300)
committerHelge Deller <deller@gmx.de>
Fri, 15 Mar 2024 09:05:35 +0000 (10:05 +0100)
There are some actions with value 'tmp' but 'dst_addr' is checked instead.
It is obvious that a copy-paste error was made here and the value
of variable 'tmp' should be checked here.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Aleksandr Burakov <a.burakov@rosalinux.ru>
Signed-off-by: Helge Deller <deller@gmx.de>
drivers/video/fbdev/via/accel.c

index 0a1bc7a4d7853cebb85b46a90a11a4c25257717c..1e04026f0809185a91486043abca094d19d43c45 100644 (file)
@@ -115,7 +115,7 @@ static int hw_bitblt_1(void __iomem *engine, u8 op, u32 width, u32 height,
 
        if (op != VIA_BITBLT_FILL) {
                tmp = src_mem ? 0 : src_addr;
-               if (dst_addr & 0xE0000007) {
+               if (tmp & 0xE0000007) {
                        printk(KERN_WARNING "hw_bitblt_1: Unsupported source "
                                "address %X\n", tmp);
                        return -EINVAL;
@@ -260,7 +260,7 @@ static int hw_bitblt_2(void __iomem *engine, u8 op, u32 width, u32 height,
                writel(tmp, engine + 0x18);
 
                tmp = src_mem ? 0 : src_addr;
-               if (dst_addr & 0xE0000007) {
+               if (tmp & 0xE0000007) {
                        printk(KERN_WARNING "hw_bitblt_2: Unsupported source "
                                "address %X\n", tmp);
                        return -EINVAL;