Commit 15b38d9a authored by Felipe Balbi's avatar Felipe Balbi Committed by Suman Anna
Browse files

remoteproc/pruss: fix couple of NULL pointer dereferences



The platform_get_resource_byname() function returns a NULL
pointer on failure (device does not have the corresponding
resource). The devm_ioremap_resource() function can handle
this NULL resource NULL pointer, and will fail in turn, but
any direct dereferences of the resource structure results in
a NULL pointer dereference error. Fix these by checking first
for the ERR_PTR()s returned by devm_ioremap_resource() for
a NULL resource pointer.

Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
[afd@ti.com: add fix in pru_rproc_probe as well]
Signed-off-by: default avatarAndrew F. Davis <afd@ti.com>
[s-anna@ti.com: revise commit description]
Signed-off-by: default avatarSuman Anna <s-anna@ti.com>
parent ce32a341
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment