Skip to content

Commit 0acd7c2

Browse files
fifteenhexUlrich Hecht
authored andcommitted
fbdev: atyfb: Check if pll_ops->init_pll failed
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: 1da177e ("Linux-2.6.12-rc2") Signed-off-by: Daniel Palmer <daniel@0x0f.com> Signed-off-by: Helge Deller <deller@gmx.de> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ulrich Hecht <uli@kernel.org>
1 parent 8956997 commit 0acd7c2

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

drivers/video/fbdev/aty/atyfb_base.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2601,8 +2601,12 @@ static int aty_init(struct fb_info *info)
26012601
printk("\n");
26022602
}
26032603
#endif
2604-
if (par->pll_ops->init_pll)
2605-
par->pll_ops->init_pll(info, &par->pll);
2604+
if (par->pll_ops->init_pll) {
2605+
ret = par->pll_ops->init_pll(info, &par->pll);
2606+
if (ret)
2607+
return ret;
2608+
}
2609+
26062610
if (par->pll_ops->resume_pll)
26072611
par->pll_ops->resume_pll(info, &par->pll);
26082612

0 commit comments

Comments
 (0)