BugLink: https://bugs.launchpad.net/bugs/2078388
[ Upstream commit 2fa26ca8b786888673689ccc9da6094150939982 ]
In imx_rproc_addr_init() "nph = of_count_phandle_with_args()" just counts
number of phandles. But phandles may be empty. So of_parse_phandle() in
the parsing loop (0 < a < nph) may return NULL which is later dereferenced.
Adjust this issue by adding NULL-return check.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes:
|
||
|---|---|---|
| .. | ||
| Kconfig | ||
| Makefile | ||
| da8xx_remoteproc.c | ||
| imx_rproc.c | ||
| keystone_remoteproc.c | ||
| omap_remoteproc.c | ||
| omap_remoteproc.h | ||
| qcom_common.c | ||
| qcom_common.h | ||
| qcom_q6v5.c | ||
| qcom_q6v5.h | ||
| qcom_q6v5_adsp.c | ||
| qcom_q6v5_mss.c | ||
| qcom_q6v5_pas.c | ||
| qcom_q6v5_wcss.c | ||
| qcom_sysmon.c | ||
| qcom_wcnss.c | ||
| qcom_wcnss.h | ||
| qcom_wcnss_iris.c | ||
| remoteproc_core.c | ||
| remoteproc_debugfs.c | ||
| remoteproc_elf_loader.c | ||
| remoteproc_internal.h | ||
| remoteproc_sysfs.c | ||
| remoteproc_virtio.c | ||
| st_remoteproc.c | ||
| st_slim_rproc.c | ||
| stm32_rproc.c | ||
| wkup_m3_rproc.c | ||