From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73A891465BE; Thu, 11 Apr 2024 10:23:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712831025; cv=none; b=MEl+nTHix3cL9pl2PSFoR9RaLnWnhoRX3OGgS+JLwgt9mxICwpFpWeTV/HDGOpif0FjJbOffW23vtpaG8m0cfZsV4Vix3oudWzVNZChu5GGbrMl5hnRHF5shqtbw5gj5OYVfieyLgqbS22bJj6LHTf59BeZsr2geqiHhmwYvZHk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712831025; c=relaxed/simple; bh=HY3cxfi5qaAw1qB3JDSsDbF+hdXB7lU5cKLEaQjyc8U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FGi9QbEgT48IY/7GeZglAuU1/3/aMgo0f6WHiJeR/+cXKF7vVlWFr7CzmROnCdxr45fLj7Qf0VMqh8CE8iWp4Dc4SxqksjVVrTR3xz97BBZrda5KF5GVAX94MXJh/TvD1Fw353X8STCr7zm75X852Wvg01UuLudUYvicdga1an4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=sbeDDuye; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="sbeDDuye" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EE54EC43390; Thu, 11 Apr 2024 10:23:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1712831025; bh=HY3cxfi5qaAw1qB3JDSsDbF+hdXB7lU5cKLEaQjyc8U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sbeDDuye0lmtyj14ZAu+B7+g/H0kbp5XV5yvsxRjb5/WV1UIdxV8ocsOgUabJWqMv v0GxsGjBwWzAsiy7s44F/sfGag2jilpTafDvrqmcf23Yu0v6GsLQoQMdq/d04djRcd 2jbciWSFob0GHNCNCJ1txMNoJGJgUJpvh48g2wDI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Aleksandr Burakov , Helge Deller , Sasha Levin Subject: [PATCH 5.4 199/215] fbdev: viafb: fix typo in hw_bitblt_1 and hw_bitblt_2 Date: Thu, 11 Apr 2024 11:56:48 +0200 Message-ID: <20240411095430.840167098@linuxfoundation.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240411095424.875421572@linuxfoundation.org> References: <20240411095424.875421572@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Aleksandr Burakov [ Upstream commit bc87bb342f106a0402186bcb588fcbe945dced4b ] 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 Signed-off-by: Helge Deller Signed-off-by: Sasha Levin --- drivers/video/fbdev/via/accel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/via/accel.c b/drivers/video/fbdev/via/accel.c index 0a1bc7a4d7853..1e04026f08091 100644 --- a/drivers/video/fbdev/via/accel.c +++ b/drivers/video/fbdev/via/accel.c @@ -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; -- 2.43.0