mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-12-04 01:36:58 -05:00
| Filename | Latest commit message | Latest commit date |
|---|---|---|
[ Upstream commit 72d9b9747e78979510e9aafdd32eb99c7aa30dd1 ]
The gcc plugin -fanalyzer [1] tries to detect various
patterns of incorrect behaviour. The tool reports:
drivers/acpi/acpi_extlog.c: In function ‘extlog_exit’:
drivers/acpi/acpi_extlog.c:307:12: warning: check of ‘extlog_l1_addr’ for NULL after already dereferencing it [-Wanalyzer-deref-before-check]
|
| 306 | ((struct extlog_l1_head *)extlog_l1_addr)->flags &= ~FLAG_OS_OPTIN;
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
| | |
| | (1) pointer ‘extlog_l1_addr’ is dereferenced here
| 307 | if (extlog_l1_addr)
| | ~
| | |
| | (2) pointer ‘extlog_l1_addr’ is checked for NULL here but it was already dereferenced at (1)
|
Fix the NULL pointer dereference check in extlog_exit().
Link: https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Static-Analyzer-Options.html # [1]
Signed-off-by: Prarit Bhargava <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
|
||
| .. | ||
| acpica | ||
| apei | ||
| arm64 | ||
| dptf | ||
| hmat | ||
| nfit | ||
| pmic | ||
| x86 | ||
| ac.c | ||
| acpi_adxl.c | ||
| acpi_amba.c | ||
| acpi_apd.c | ||
| acpi_cmos_rtc.c | ||
| acpi_configfs.c | ||
| acpi_dbg.c | ||
| acpi_extlog.c | ||
| acpi_ipmi.c | ||
| acpi_lpat.c | ||
| acpi_lpit.c | ||
| acpi_lpss.c | ||
| acpi_memhotplug.c | ||
| acpi_pad.c | ||
| acpi_platform.c | ||
| acpi_pnp.c | ||
| acpi_processor.c | ||
| acpi_tad.c | ||
| acpi_video.c | ||
| acpi_watchdog.c | ||
| battery.c | ||
| bgrt.c | ||
| blacklist.c | ||
| bus.c | ||
| button.c | ||
| cm_sbs.c | ||
| container.c | ||
| cppc_acpi.c | ||
| custom_method.c | ||
| debugfs.c | ||
| device_pm.c | ||
| device_sysfs.c | ||
| dock.c | ||
| ec.c | ||
| ec_sys.c | ||
| event.c | ||
| evged.c | ||
| fan.c | ||
| glue.c | ||
| hed.c | ||
| internal.h | ||
| ioapic.c | ||
| irq.c | ||
| Kconfig | ||
| Makefile | ||
| numa.c | ||
| nvs.c | ||
| osi.c | ||
| osl.c | ||
| pci_irq.c | ||
| pci_link.c | ||
| pci_mcfg.c | ||
| pci_root.c | ||
| pci_slot.c | ||
| power.c | ||
| pptt.c | ||
| proc.c | ||
| processor_core.c | ||
| processor_driver.c | ||
| processor_idle.c | ||
| processor_pdc.c | ||
| processor_perflib.c | ||
| processor_thermal.c | ||
| processor_throttling.c | ||
| property.c | ||
| reboot.c | ||
| resource.c | ||
| sbs.c | ||
| sbshc.c | ||
| sbshc.h | ||
| scan.c | ||
| sleep.c | ||
| sleep.h | ||
| spcr.c | ||
| sysfs.c | ||
| tables.c | ||
| thermal.c | ||
| utils.c | ||
| video_detect.c | ||
| wakeup.c | ||