Commit 7663cfd3 authored by Dan Carpenter's avatar Dan Carpenter Committed by Jason Cooper
Browse files

bus: mvebu-mbus: potential forever loop in mvebu_mbus_init()

"of_id->compatible" is an array and not a pointer so it can never be

Signed-off-by: default avatarDan Carpenter <>
Acked-by: default avatarEzequiel Garcia <>
Signed-off-by: default avatarJason Cooper <>
parent 6ce4eac1
......@@ -734,11 +734,11 @@ int __init mvebu_mbus_init(const char *soc, phys_addr_t mbuswins_phys_base,
const struct of_device_id *of_id;
for (of_id = of_mvebu_mbus_ids; of_id->compatible; of_id++)
for (of_id = of_mvebu_mbus_ids; of_id->compatible[0]; of_id++)
if (!strcmp(of_id->compatible, soc))
if (!of_id->compatible) {
if (!of_id->compatible[0]) {
pr_err("could not find a matching SoC family\n");
return -ENODEV;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment