diff options
author | Haowen Bai | 2022-04-01 11:41:16 +0800 |
---|---|---|
committer | Helge Deller | 2022-04-04 08:55:23 +0200 |
commit | d1d608ce78b3fc330938faaa1f70a91cf20c03a9 (patch) | |
tree | 31600424800a543fbcfc61a3397663dbc33b0b05 /drivers/video | |
parent | b23e868d35d572d459e9be4b994a8c709f1a1606 (diff) |
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>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fbdev/sis/sis_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/fbdev/sis/sis_main.c b/drivers/video/fbdev/sis/sis_main.c index 742f62986b80..f28fd69d5eb7 100644 --- a/drivers/video/fbdev/sis/sis_main.c +++ b/drivers/video/fbdev/sis/sis_main.c @@ -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]; |