All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] bus: mvebu-mbus: potential forever loop in mvebu_mbus_init()
@ 2013-11-13  7:50 Dan Carpenter
  2013-11-13 15:18 ` Jason Cooper
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Dan Carpenter @ 2013-11-13  7:50 UTC (permalink / raw)
  To: kernel-janitors

"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>
---
I'm not able to compile this.

diff --git a/drivers/bus/mvebu-mbus.c b/drivers/bus/mvebu-mbus.c
index 2394e97..c646a76 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;
 	}

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-11-24 13:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-13  7:50 [patch] bus: mvebu-mbus: potential forever loop in mvebu_mbus_init() Dan Carpenter
2013-11-13 15:18 ` Jason Cooper
2013-11-13 17:32 ` Ezequiel Garcia
2013-11-13 17:33 ` Ezequiel Garcia
2013-11-24  3:56 ` Jason Cooper
2013-11-24 11:20 ` Ezequiel Garcia
2013-11-24 13:03 ` Jason Cooper

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.