diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-11-13 10:50:24 +0300 |
---|---|---|
committer | Jason Cooper <jason@lakedaemon.net> | 2013-11-24 13:03:00 +0000 |
commit | 7663cfd3f49f9e48e74fc2258b040d6828b20f0b (patch) | |
tree | 2f34e07f29d4aaebe0765202e16c6ca9b1929509 /drivers/bus | |
parent | 6ce4eac1f600b34f2f7f58f9cd8f0503d79e42ae (diff) | |
download | linux-7663cfd3f49f9e48e74fc2258b040d6828b20f0b.tar.gz linux-7663cfd3f49f9e48e74fc2258b040d6828b20f0b.tar.bz2 linux-7663cfd3f49f9e48e74fc2258b040d6828b20f0b.zip |
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
NULL.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'drivers/bus')
-rw-r--r-- | drivers/bus/mvebu-mbus.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/bus/mvebu-mbus.c b/drivers/bus/mvebu-mbus.c index 2394e9753ef5..c646a769e1f5 100644 --- a/drivers/bus/mvebu-mbus.c +++ b/drivers/bus/mvebu-mbus.c @@ -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)) break; - if (!of_id->compatible) { + if (!of_id->compatible[0]) { pr_err("could not find a matching SoC family\n"); return -ENODEV; } |