Commit d1d608ce authored by Haowen Bai's avatar Haowen Bai Committed by Helge Deller
Browse files

video: fbdev: sis: fix potential NULL dereference in sisfb_post_sis300()



Do no access bios[] if it's NULL.

Signed-off-by: default avatarHaowen Bai <baihaowen@meizu.com>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent b23e868d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4463,7 +4463,7 @@ static void sisfb_post_sis300(struct pci_dev *pdev)
		SiS_SetReg(SISCR, 0x37, 0x02);
		SiS_SetReg(SISPART2, 0x00, 0x1c);
		v4 = 0x00; v5 = 0x00; v6 = 0x10;
		if(ivideo->SiS_Pr.UseROM) {
		if (ivideo->SiS_Pr.UseROM && bios) {
			v4 = bios[0xf5];
			v5 = bios[0xf6];
			v6 = bios[0xf7];