Linux Remote Processor Subsystem development
 help / color / mirror / Atom feed
* [bug report] remoteproc/mediatek: add SCP support for mt8183
@ 2020-09-16 14:54 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2020-09-16 14:54 UTC (permalink / raw)
  To: erin.lo; +Cc: linux-remoteproc

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-16 21:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-16 14:54 [bug report] remoteproc/mediatek: add SCP support for mt8183 Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox