[bug report] remoteproc: pru: Add pru_rproc_set_ctable() function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Roger Quadros,

The patch 102853400321: "remoteproc: pru: Add pru_rproc_set_ctable()
function" from Jan 6, 2023, leads to the following Smatch static
checker warning:

	drivers/remoteproc/pru_rproc.c:326 pru_rproc_set_ctable()
	warn: variable dereferenced before IS_ERR check 'rproc' (see line 320)

drivers/remoteproc/pru_rproc.c
    316  * Return: 0 on success, or errno in error case.
    317  */
    318 int pru_rproc_set_ctable(struct rproc *rproc, enum pru_ctable_idx c, u32 addr)
    319 {
    320         struct pru_rproc *pru = rproc->priv;
                                        ^^^^^^^^^^^
Dereference

    321         unsigned int reg;
    322         u32 mask, set;
    323         u16 idx;
    324         u16 idx_mask;
    325 
--> 326         if (IS_ERR_OR_NULL(rproc))
                                   ^^^^^
Checked too late.

    327                 return -EINVAL;

regards,
dan carpenter



[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux