mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
remoteproc: st: fix check of syscon_regmap_lookup_by_phandle() return value
syscon_regmap_lookup_by_phandle() returns either a valid pointer to struct regmap or ERR_PTR() error value, check for NULL is invalid and on error path may lead to oops, the change corrects the check. Signed-off-by: Vladimir Zapolskiy <[email protected]> Acked-by: Lee Jones <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]>
This commit is contained in:
parent
f55532a0c0
commit
4b28038fd6
1 changed files with 2 additions and 2 deletions
|
|
@ -189,9 +189,9 @@ static int st_rproc_parse_dt(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
ddata->boot_base = syscon_regmap_lookup_by_phandle(np, "st,syscfg");
|
||||
if (!ddata->boot_base) {
|
||||
if (IS_ERR(ddata->boot_base)) {
|
||||
dev_err(dev, "Boot base not found\n");
|
||||
return -EINVAL;
|
||||
return PTR_ERR(ddata->boot_base);
|
||||
}
|
||||
|
||||
err = of_property_read_u32_index(np, "st,syscfg", 1,
|
||||
|
|
|
|||
Loading…
Reference in a new issue