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:Felipe Balbi <balbi@ti.com> [afd@ti.com: add fix in pru_rproc_probe as well] Signed-off-by:
Andrew F. Davis <afd@ti.com> [s-anna@ti.com: revise commit description] Signed-off-by:
Suman Anna <s-anna@ti.com>
Loading
Please sign in to comment