remoteproc/mediatek: add SCP support for mt8183
Hello Erin Lo,
The patch 63c13d61eafe: "remoteproc/mediatek: add SCP support for mt8183" from Nov 12, 2019, leads to the following static checker warning:
drivers/remoteproc/mtk_scp_ipi.c:34 scp_ipi_register()
error: we previously assumed 'scp' could be null (see line 33)
drivers/remoteproc/mtk_scp_ipi.c
28 int scp_ipi_register(struct mtk_scp *scp,
29 u32 id,
30 scp_ipi_handler_t handler,
31 void *priv)
32 {
33 if (!scp) {
^^^^
Check
34 dev_err(scp->dev, "scp device is not ready\n");
^^^^^^^^NULL dereference
35 return -EPROBE_DEFER;
36 }
37
38 if (WARN_ON(id >= SCP_IPI_MAX) || WARN_ON(handler == NULL))
39 return -EINVAL;
40
41 scp_ipi_lock(scp, id);
42 scp->ipi_desc[id].handler = handler;regards,
dan carpenter