mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 12:35:52 +02:00
Clang static analysis reports this representative error
init.c:2501:18: warning: Array access (from variable 'queuedata') results
in a null pointer dereference
templ |= ((queuedata[i] & 0xc0) << 3);
This is the problem block of code
if(ModeNo > 0x13) {
...
if(SiS_Pr->ChipType == SIS_730) {
queuedata = &FQBQData730[0];
} else {
queuedata = &FQBQData[0];
}
} else {
}
queuedata is not set in the else block
Reviewing the old code, the arrays FQBQData730 and FQBQData were
used directly.
So hoist the setting of queuedata out of the if-else block.
Fixes:
|
||
|---|---|---|
| .. | ||
| backlight | ||
| console | ||
| fbdev | ||
| logo | ||
| display_timing.c | ||
| hdmi.c | ||
| Kconfig | ||
| Makefile | ||
| of_display_timing.c | ||
| of_videomode.c | ||
| vgastate.c | ||
| videomode.c | ||