linux/drivers/video
James Bates 55aa42f2e6 efifb: prevent null-deref when iterating dmi_list
The dmi_list array is initialized using gnu designated initializers, and
therefore may contain fewer explicitly defined entries as there are
elements in it. This is because the enum above with M_xyz constants
contains more items than the designated initializer. Those elements not
explicitly initialized are implicitly set to 0.

Now efifb_setup() loops through all these array elements, and performs
a strcmp on each item. For non explicitly initialized elements this will
be a null pointer:

This patch swaps the check order in the if statement, thus checks first
whether dmi_list[i].base is null.

Signed-off-by: James Bates <james.h.bates@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-10-29 12:41:46 +02:00
..
aty video: aty: Remove incorrect checks 2013-09-26 11:52:31 +03:00
backlight backlight: tosa: Remove redundant spi_set_drvdata 2013-09-26 11:47:27 +03:00
console fbdev: fbcon: select VT_HW_CONSOLE_BINDING 2013-08-02 16:17:51 -07:00
exynos video: exynos: Ensure definitions match prototypes 2013-08-30 10:14:38 +03:00
geode video: gxfb: remove unnecessary pci_set_drvdata() 2013-09-19 13:30:07 +03:00
i810 video: i810fb: remove unnecessary pci_set_drvdata() 2013-09-19 13:30:07 +03:00
intelfb video: intelfb: remove unnecessary pci_set_drvdata() 2013-09-19 13:30:07 +03:00
kyro video: kyro: Remove redundant break 2013-09-26 11:50:08 +03:00
logo Bye, bye, WfW flag 2013-09-11 19:55:12 -07:00
matrox video/matrox/matroxfb_maven: Use module_i2c_driver to register driver 2013-09-19 13:30:10 +03:00
mb862xx video: mb862xx: Remove redundant dev_set_drvdata 2013-09-26 13:49:09 +03:00
mbx video: mbxfb: use dev_get_platdata() 2013-09-20 12:22:03 +03:00
mmp video: mmp: add pitch info in mmp_win structure 2013-09-20 12:52:33 +03:00
msm ARM: msm: Move mach/board.h contents to common.h 2013-08-06 11:18:02 -07:00
nvidia Drivers: video: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
omap video: omapfb: use dev_get_platdata() 2013-09-20 12:22:01 +03:00
omap2 OMAPDSS: Fix de_level in videomode_to_omap_video_timings() 2013-10-18 10:57:43 +03:00
riva video: riva: Remove incorrect checks 2013-09-26 11:52:31 +03:00
savage video: savagefb: remove unnecessary pci_set_drvdata() 2013-09-19 13:30:09 +03:00
sis video: sisfb: remove unnecessary pci_set_drvdata() 2013-09-19 13:30:09 +03:00
vermilion fbdev/vermillion: use vm_iomap_memory() 2013-04-24 08:41:42 +03:00
via viafb: rename display_timing to via_display_timing 2013-01-24 08:59:44 +01:00
68328fb.c
Kconfig video: atmel_lcdfb: add device tree suport 2013-09-27 09:26:20 +03:00
Makefile lib: Move fonts from drivers/video/console/ to lib/fonts/ 2013-06-28 10:28:22 +02:00
acornfb.c drivers/video/acornfb.c: remove dead code 2013-09-11 15:56:22 -07:00
acornfb.h drivers/video/acornfb.c: remove dead code 2013-09-11 15:56:22 -07:00
amba-clcd.c video: amba-clcd: Remove unnecessary amba_set_drvdata() 2013-10-09 12:35:44 +03:00
amifb.c video: amifb: Remove redundant dev_set_drvdata 2013-09-26 13:49:22 +03:00
arcfb.c Drivers: video: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
arkfb.c framebuffer: arkfb: Fix framebugger typo 2013-09-26 12:46:27 +03:00
asiliantfb.c Drivers: video: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
atafb.c
atafb.h
atafb_iplan2p2.c
atafb_iplan2p4.c
atafb_iplan2p8.c
atafb_mfb.c
atafb_utils.h
atmel_lcdfb.c video: atmel_lcdfb: add device tree suport 2013-09-27 09:26:20 +03:00
au1100fb.c Video / au1100fb: Use module_platform_driver() to simplify code 2013-09-30 10:51:10 +03:00
au1100fb.h
au1200fb.c Video / au1200fb: Use module_platform_driver() to simplify code 2013-09-30 10:51:09 +03:00
au1200fb.h
auo_k190x.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-04-30 09:36:50 -07:00
auo_k190x.h
auo_k1900fb.c AUO-K190x: add runtime-pm calls to controller init functions 2013-04-04 13:08:06 +03:00
auo_k1901fb.c AUO-K190x: add runtime-pm calls to controller init functions 2013-04-04 13:08:06 +03:00
bf54x-lq043fb.c Video / bf54x-lq043fb: Use module_platform_driver() to simplify code 2013-09-30 10:51:09 +03:00
bf537-lq035.c Drivers: video: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
bfin-lq035q1-fb.c fbdev: bfin-lq035q1-fb: Use dev_pm_ops 2013-06-26 16:16:26 +03:00
bfin-t350mcqb-fb.c Video / bfin-t350mcqb-fb: Use module_platform_driver() to simplify code 2013-09-30 10:51:08 +03:00
bfin_adv7393fb.c procfs: new helper - PDE_DATA(inode) 2013-04-09 14:13:32 -04:00
bfin_adv7393fb.h
broadsheetfb.c Video / broadsheetfb: Use module_platform_driver() to simplify code 2013-09-30 10:51:09 +03:00
bt431.h
bt455.h
bw2.c video: bw2: Remove redundant dev_set_drvdata 2013-09-26 13:49:22 +03:00
c2p.h
c2p_core.h
c2p_iplan2.c
c2p_planar.c
carminefb.c video: carminefb: remove unnecessary pci_set_drvdata() 2013-09-19 13:30:06 +03:00
carminefb.h
carminefb_regs.h
cfbcopyarea.c
cfbfillrect.c
cfbimgblt.c
cg3.c video: cg3: Remove redundant dev_set_drvdata 2013-09-26 13:49:23 +03:00
cg6.c video: cg6: Remove redundant dev_set_drvdata 2013-09-26 13:49:24 +03:00
cg14.c video: cg14: Remove redundant dev_set_drvdata 2013-09-26 13:49:23 +03:00
chipsfb.c Drivers: video: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
cirrusfb.c video: cirrusfb: Remove incorrect checks 2013-09-26 11:52:31 +03:00
clps711xfb.c ARM defconfigs: add missing inclusions of linux/platform_device.h 2013-02-14 15:14:32 -08:00
cobalt_lcdfb.c Video / cobalt_lcdfb: Use module_platform_driver() to simplify code 2013-09-30 10:51:09 +03:00
controlfb.c fbdev/controlfb: use vm_iomap_memory() 2013-04-24 08:41:41 +03:00
controlfb.h
cyber2000fb.c video: cyber2000fb: remove unnecessary pci_set_drvdata() 2013-09-19 13:30:06 +03:00
cyber2000fb.h
da8xx-fb.c Video / da8xx-fb: Use module_platform_driver() to simplify code 2013-09-30 10:51:09 +03:00
display_timing.c video: add display_timing and videomode 2013-01-24 09:03:04 +01:00
dnfb.c Drivers: video: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
edid.h
efifb.c efifb: prevent null-deref when iterating dmi_list 2013-10-29 12:41:46 +02:00
ep93xx-fb.c video: ep93xx-fb: use dev_get_platdata() 2013-09-20 12:22:02 +03:00
fb-puv3.c fbdev/fb-puv3: use vm_iomap_memory() 2013-04-24 08:41:41 +03:00
fb_ddc.c
fb_defio.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
fb_draw.h
fb_notify.c
fb_sys_fops.c
fbcmap.c drivers: video: fbcmap: remove the redundency and incorrect checkings 2013-08-30 11:41:24 +03:00
fbcvt.c
fbmem.c fbmem: move EXPORT_SYMBOL annotation next to symbol declarations 2013-08-30 11:44:24 +03:00
fbmon.c Merge branch '3.10/fb-mmap' into for-next 2013-04-26 09:14:47 +03:00
fbsysfs.c fb: rework locking to fix lock ordering on takeover 2013-02-08 12:02:40 +10:00
ffb.c video: ffb: Remove redundant dev_set_drvdata 2013-09-26 13:49:24 +03:00
fm2fb.c Drivers: video: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
fsl-diu-fb.c video: replace strict_strtoul() with kstrtoul() 2013-06-26 15:19:48 +03:00
g364fb.c
gbefb.c fbdev: improve fb_mmap bounds checks 2013-04-26 08:28:56 +03:00
goldfishfb.c treewide: Fix typos in printk 2013-03-20 16:26:32 +01:00
grvga.c video: grvga: Remove redundant dev_set_drvdata 2013-09-26 13:49:07 +03:00
gxt4500.c Drivers: video: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
hdmi.c video/hdmi: Rename HDMI_IDENTIFIER to HDMI_IEEE_OUI 2013-08-30 08:42:01 +10:00
hecubafb.c Video / hecubafb: Use module_platform_driver() to simplify code 2013-09-30 10:51:08 +03:00
hgafb.c Drivers: video: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
hitfb.c Drivers: video: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
hpfb.c Drivers: video: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
hyperv_fb.c hyperv-fb: add blanking support 2013-10-09 12:52:50 +03:00
i740_reg.h
i740fb.c video: i740fb: remove unnecessary pci_set_drvdata() 2013-09-19 13:30:07 +03:00
igafb.c Drivers: video: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
imsttfb.c Drivers: video: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
imxfb.c video: imxfb: use dev_get_platdata() 2013-09-20 12:22:03 +03:00
jz4740_fb.c Video / jz4740_fb: Use module_platform_driver() to simplify code 2013-09-30 10:51:09 +03:00
leo.c video: leo: Remove redundant dev_set_drvdata 2013-09-26 13:49:08 +03:00
macfb.c
macmodes.c
macmodes.h
maxinefb.c
metronomefb.c fbdev: fix error return code in metronomefb_probe() 2013-10-29 12:20:11 +02:00
modedb.c
mx3fb.c video: mx3fb: use dev_get_platdata() 2013-09-20 12:22:01 +03:00
mxsfb.c fbdev changes for 3.12: 2013-09-05 09:49:32 -07:00
n411.c
neofb.c video: neofb: remove unnecessary pci_set_drvdata() 2013-09-19 13:30:09 +03:00
nuc900fb.c video: nuc900fb: use dev_get_platdata() 2013-09-20 12:22:01 +03:00
nuc900fb.h
of_display_timing.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2013-07-09 16:04:31 -07:00
of_videomode.c videomode: videomode_from_timing work 2013-03-21 14:34:33 +02:00
offb.c
output.c video: output: convert class code to use dev_groups 2013-07-26 10:37:02 +03:00
p9100.c video: p9100: Remove redundant dev_set_drvdata 2013-09-26 13:49:25 +03:00
platinumfb.c video: platinumfb: Remove redundant dev_set_drvdata 2013-09-26 13:49:25 +03:00
platinumfb.h
pm2fb.c video: pm2fb: remove unnecessary pci_set_drvdata() 2013-09-19 13:30:09 +03:00
pm3fb.c video: pm3fb: remove unnecessary pci_set_drvdata() 2013-09-19 13:30:09 +03:00
pmag-aa-fb.c
pmag-ba-fb.c Drivers: video: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
pmagb-b-fb.c Drivers: video: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
ps3fb.c fbdev/ps3fb: Fix section mismatch warning for ps3fb_probe 2013-09-11 11:39:39 +10:00
pvr2fb.c Drivers: video: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
pxa3xx-gcu.c Various fbdev changes for 3.11 2013-07-09 15:51:32 -07:00
pxa3xx-gcu.h
pxa168fb.c video: pxa168fb: use dev_get_platdata() 2013-09-20 12:22:01 +03:00
pxa168fb.h
pxafb.c video: pxafb: use dev_get_platdata() 2013-09-20 12:22:02 +03:00
pxafb.h
q40fb.c Drivers: video: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
s1d13xxxfb.c video: s1d13xxxfb: use dev_get_platdata() 2013-09-20 12:23:10 +03:00
s3c-fb.c video: s3c-fb: use dev_get_platdata() 2013-09-20 12:23:21 +03:00
s3c2410fb.c video: s3c2410: use dev_get_platdata() 2013-09-20 12:22:02 +03:00
s3c2410fb.h
s3fb.c video: s3fb: remove unnecessary pci_set_drvdata() 2013-09-19 13:30:09 +03:00
sa1100fb.c video: sa1100fb: use dev_get_platdata() 2013-09-20 12:22:02 +03:00
sa1100fb.h
sbuslib.c
sbuslib.h
sgivwfb.c fbdev/sgivwfb: fix compilation error in sgivwfb_mmap() 2013-07-26 11:27:53 +03:00
sh7760fb.c video: sh7760fb: fix to pass correct device identity to free_irq() 2013-07-29 11:25:03 +03:00
sh_mipi_dsi.c video: remove unnecessary platform_set_drvdata() 2013-06-26 14:44:40 +03:00
sh_mobile_hdmi.c fbdev: sh_mobile_hdmi: Use devm_kzalloc() 2013-10-09 12:35:43 +03:00
sh_mobile_lcdcfb.c fbdev: sh_mobile_lcdc: fixup B side hsync adjust settings 2013-03-27 22:47:24 +09:00
sh_mobile_lcdcfb.h
sh_mobile_meram.c Drivers: video: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
simplefb.c simplefb: print some info about the registered fb 2013-10-09 12:35:46 +03:00
skeletonfb.c Drivers: video: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
sm501fb.c Drivers: video: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
smscufx.c video: smscufx: Use NULL instead of 0 2013-09-26 11:50:08 +03:00
ssd1307fb.c video: ssd1307fb: Remove redundant of_match_ptr 2013-10-09 12:35:44 +03:00
sstfb.c Drivers: video: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
sticore.h
stifb.c
sunxvr500.c Drivers: video: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
sunxvr1000.c video: sunxvr1000: Remove redundant dev_set_drvdata 2013-09-26 13:49:26 +03:00
sunxvr2500.c Drivers: video: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
svgalib.c
syscopyarea.c
sysfillrect.c
sysimgblt.c
tcx.c video: tcx: Remove redundant dev_set_drvdata 2013-09-26 13:49:26 +03:00
tdfxfb.c video: tdfxfb: remove unnecessary pci_set_drvdata() 2013-09-19 13:30:10 +03:00
tgafb.c Drivers: video: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
tmiofb.c video: tmiofb: use dev_get_platdata() 2013-09-20 12:23:22 +03:00
tridentfb.c video: tridentfb: remove unnecessary pci_set_drvdata() 2013-09-19 13:30:10 +03:00
udlfb.c video: udlfb: Use NULL instead of 0 2013-09-26 11:50:07 +03:00
uvesafb.c video: uvesafb: Remove redundant NULL check 2013-09-26 11:50:08 +03:00
valkyriefb.c
valkyriefb.h
vesafb.c fbdev: vesafb: bind to platform-framebuffer device 2013-08-02 16:17:49 -07:00
vfb.c video: vfb: Remove incorrect check 2013-09-26 11:52:31 +03:00
vga16fb.c vga16fb: Remove unused variable 2013-07-26 10:28:50 +03:00
vgastate.c
videomode.c videomode: videomode_from_timing work 2013-03-21 14:34:33 +02:00
vt8500lcdfb.c video: remove unnecessary platform_set_drvdata() 2013-06-26 14:44:40 +03:00
vt8500lcdfb.h
vt8623fb.c video: vt8623fb: remove unnecessary pci_set_drvdata() 2013-09-19 13:30:10 +03:00
w100fb.c video: w100fb: use dev_get_platdata() 2013-09-20 12:23:22 +03:00
w100fb.h
wm8505fb.c video: wm8505fb: Remove redundant of_match_ptr 2013-10-09 12:35:45 +03:00
wm8505fb_regs.h
wmt_ge_rops.c video: wmt_ge_rops: Fix a trivial typo 2013-10-09 12:35:46 +03:00
wmt_ge_rops.h video: vt8500: Make wmt_ge_rops optional 2013-04-04 13:07:33 +03:00
xen-fbfront.c Drivers: video: remove __dev* attributes. 2013-01-03 15:57:01 -08:00
xilinxfb.c video: xilinxfb: Fix for "Use standard variable name convention" 2013-10-29 10:49:40 +02:00