mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 06:10:56 +00:00
video: fbdev: sis: fix potential NULL dereference in sisfb_post_sis300()
Do no access bios[] if it's NULL. Signed-off-by: Haowen Bai <baihaowen@meizu.com> Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
parent
b23e868d35
commit
d1d608ce78
1 changed files with 1 additions and 1 deletions
|
@ -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];
|
||||
|
|
Loading…
Reference in a new issue