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 BE26426156E; Tue, 8 Apr 2025 12:14:26 +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=1744114466; cv=none; b=JYVkMsd53WwWEXQ3AlVAoRCopc3o0PeONj50haryLqgc+lQ9FGjpDKWs9bcn3Dofrest1kRiloYcignFf9UT20uAnz2FI7QPQzroage2lzg3g0/J3ZJ5ZA5E/VzQCJmBuxugjcAYsj8l8NhLkBXUfV3V+qAA1X+fn57txqrrl7Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744114466; c=relaxed/simple; bh=y3deuOFwzRk75dmGvOicONp2rydOm0mygxP+McEYCpY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=aBQv4UcSHTZcHyHoYdMVYY5N319hxy/YSd9Nd/PKHcKqvsTBZfyeNXiZ/8PH+Hc18kEANbMva6jVDuc+yHrGd5TS0AnSjR5FRbEqpMrud0uLUmmdeymRgoDx3Zy30tgbU1UOZm660aWaaA1R/gcKGllyTYukex4RN0n6LVFjQSw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=XHZw+B/R; 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="XHZw+B/R" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0840C4CEE5; Tue, 8 Apr 2025 12:14:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744114466; bh=y3deuOFwzRk75dmGvOicONp2rydOm0mygxP+McEYCpY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XHZw+B/RPzwxkVCAXmLnC0Ls43C9HI3DOLzkOC0YyAdr9/SO0T3jSgaB1Jomtt8lY U1sOeYlPpIFl8O5NLHOHJCpYT7LOqYJUhHZmrTU9hpayZkHXWBwxgpCRx4bG/Rv6vm 1wqq2Z/83lzhlCbHtbr8reV5+Wpu0IZZadb/xZ70= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Markus Elfring , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Helge Deller , Sasha Levin Subject: [PATCH 6.13 116/499] fbdev: au1100fb: Move a variable assignment behind a null pointer check Date: Tue, 8 Apr 2025 12:45:28 +0200 Message-ID: <20250408104854.096704687@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250408104851.256868745@linuxfoundation.org> References: <20250408104851.256868745@linuxfoundation.org> User-Agent: quilt/0.68 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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.13-stable review patch. If anyone has any objections, please let me know. ------------------ From: Markus Elfring [ Upstream commit 2df2c0caaecfd869b49e14f2b8df822397c5dd7f ] The address of a data structure member was determined before a corresponding null pointer check in the implementation of the function “au1100fb_setmode”. This issue was detected by using the Coccinelle software. Fixes: 3b495f2bb749 ("Au1100 FB driver uplift for 2.6.") Signed-off-by: Markus Elfring Acked-by: Uwe Kleine-König Signed-off-by: Helge Deller Signed-off-by: Sasha Levin --- drivers/video/fbdev/au1100fb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/au1100fb.c b/drivers/video/fbdev/au1100fb.c index 840f221607635..6251a6b07b3a1 100644 --- a/drivers/video/fbdev/au1100fb.c +++ b/drivers/video/fbdev/au1100fb.c @@ -137,13 +137,15 @@ static int au1100fb_fb_blank(int blank_mode, struct fb_info *fbi) */ int au1100fb_setmode(struct au1100fb_device *fbdev) { - struct fb_info *info = &fbdev->info; + struct fb_info *info; u32 words; int index; if (!fbdev) return -EINVAL; + info = &fbdev->info; + /* Update var-dependent FB info */ if (panel_is_active(fbdev->panel) || panel_is_color(fbdev->panel)) { if (info->var.bits_per_pixel <= 8) { -- 2.39.5