MLK-24326: remoteproc: imx_rproc: fix "Dereference after null check" problem
Before dereferencing fw, need to judge whether fw is a null pointer. Signed-off-by: Alice Guo <alice.guo@nxp.com>5.4-rM2-2.2.x-imx-squashed
parent
029bc3d1e4
commit
b1a763a71e
|
@ -582,8 +582,11 @@ static int imx_rproc_elf_load_segments(struct rproc *rproc,
|
||||||
{
|
{
|
||||||
struct imx_rproc *priv = rproc->priv;
|
struct imx_rproc *priv = rproc->priv;
|
||||||
|
|
||||||
if (!priv->early_boot)
|
if (!priv->early_boot) {
|
||||||
|
if (!fw)
|
||||||
|
return -EINVAL;
|
||||||
return rproc_elf_load_segments(rproc, fw);
|
return rproc_elf_load_segments(rproc, fw);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue