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 77D4D4C97; Tue, 11 Nov 2025 00:50:12 +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=1762822212; cv=none; b=qdI8TH3sKNqFP739DvUiPuuNLPIwPJLql+u2dPKMCArgIZO4R+hv//XEWFBj4XqP4hdwQzaTWtP1Qu49tXpgT5nEISNGUTYlf8jn0TqPM7f2PMWFztdJkuYD7eSnrQXJmHk2ar4aDONvnkFtlX7pwSGsQxfPsvoOIe2sCzy/sgo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762822212; c=relaxed/simple; bh=1Oo4632yTClkqHTEWApnFklwhv88RifsjKSVQuKtKSg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Gf6DA9FqgpNpGXxwieMaznRvcg192YRoHbj+HSSzubJlVak9nIcVIrLKa2oB6Y1VyWR6KdsnZptq5Xs95FIn7JxzstaslIxofqPgh4SGFdUO6j4VCj/r36yabaDFbnxngLXcRi0dj5toLtqcAsxSaTD2bTW2zrwczsklwDse+eU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=i0Itl6AG; 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="i0Itl6AG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E24B9C16AAE; Tue, 11 Nov 2025 00:50:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1762822212; bh=1Oo4632yTClkqHTEWApnFklwhv88RifsjKSVQuKtKSg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i0Itl6AGPK/P/jnrD8VUfq7i6YCQe2uKVFCsj1IS1h+B2dctLPj22brRC+qKfkQP0 NnXJt2VzT2Tri3X/rQQqQYxECjwHv1pGsmI1Ir+lGBLDflZG3/VR2vQb075J304IDX lY2kry3YcWNFNmSm3TpLzIPBAgA81Vil7Yz2G4fs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Daniel Palmer , Helge Deller Subject: [PATCH 6.12 004/565] fbdev: atyfb: Check if pll_ops->init_pll failed Date: Tue, 11 Nov 2025 09:37:40 +0900 Message-ID: <20251111004526.939770757@linuxfoundation.org> X-Mailer: git-send-email 2.51.2 In-Reply-To: <20251111004526.816196597@linuxfoundation.org> References: <20251111004526.816196597@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Daniel Palmer commit 7073c7fc8d8ba47194e5fc58fcafc0efe7586e9b upstream. Actually check the return value from pll_ops->init_pll() as it can return an error. If the card's BIOS didn't run because it's not the primary VGA card the fact that the xclk source is unsupported is printed as shown below but the driver continues on regardless and on my machine causes a hard lock up. [ 61.470088] atyfb 0000:03:05.0: enabling device (0080 -> 0083) [ 61.476191] atyfb: using auxiliary register aperture [ 61.481239] atyfb: 3D RAGE XL (Mach64 GR, PCI-33) [0x4752 rev 0x27] [ 61.487569] atyfb: 512K SGRAM (1:1), 14.31818 MHz XTAL, 230 MHz PLL, 83 Mhz MCLK, 63 MHz XCLK [ 61.496112] atyfb: Unsupported xclk source: 5. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Daniel Palmer Signed-off-by: Helge Deller Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/video/fbdev/aty/atyfb_base.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- a/drivers/video/fbdev/aty/atyfb_base.c +++ b/drivers/video/fbdev/aty/atyfb_base.c @@ -2614,8 +2614,12 @@ static int aty_init(struct fb_info *info pr_cont("\n"); } #endif - if (par->pll_ops->init_pll) - par->pll_ops->init_pll(info, &par->pll); + if (par->pll_ops->init_pll) { + ret = par->pll_ops->init_pll(info, &par->pll); + if (ret) + return ret; + } + if (par->pll_ops->resume_pll) par->pll_ops->resume_pll(info, &par->pll);