]> git.baikalelectronics.ru Git - kernel.git/commit
remoteproc/mediatek: fix null pointer dereference on null scp pointer
authorColin Ian King <colin.king@canonical.com>
Fri, 18 Sep 2020 15:24:28 +0000 (16:24 +0100)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Sat, 26 Sep 2020 04:33:23 +0000 (23:33 -0500)
commit6505d1128831bc4e8a06f24b7643f831f77a5991
treeb4335fd02738a299f3655c5570f7f48f5833b77e
parent4535a2260a9cde03e169ffc65013b276ea1265a8
remoteproc/mediatek: fix null pointer dereference on null scp pointer

Currently when pointer scp is null a dev_err is being called that
references the pointer which is the very thing we are trying to
avoid doing. Remove the extraneous error message to avoid this
issue.

Addresses-Coverity: ("Dereference after null check")
Fixes: 7cca6d2e214d ("remoteproc/mediatek: add SCP support for mt8183")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20200918152428.27258-1-colin.king@canonical.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/remoteproc/mtk_scp_ipi.c