From 7663cfd3f49f9e48e74fc2258b040d6828b20f0b Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 13 Nov 2013 10:50:24 +0300 Subject: [PATCH 1/2] 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 Acked-by: Ezequiel Garcia Signed-off-by: Jason Cooper --- drivers/bus/mvebu-mbus.c | 4 ++-- 1 file 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; } From 9c8eca3ca43d7337be2485169d4d86a9b6f477d2 Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Wed, 13 Nov 2013 14:39:47 -0300 Subject: [PATCH 2/2] bus: mvebu-mbus: Remove deprecated comment Remove a comment about the lack of a devicetree binding: this driver's binding is already implemented and in use. Signed-off-by: Ezequiel Garcia Signed-off-by: Jason Cooper --- drivers/bus/mvebu-mbus.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/bus/mvebu-mbus.c b/drivers/bus/mvebu-mbus.c index c646a769e1f5..725c46162bbd 100644 --- a/drivers/bus/mvebu-mbus.c +++ b/drivers/bus/mvebu-mbus.c @@ -588,12 +588,6 @@ static const struct mvebu_mbus_soc_data mv78xx0_mbus_data = { .show_cpu_target = mvebu_sdram_debug_show_orion, }; -/* - * The driver doesn't yet have a DT binding because the details of - * this DT binding still need to be sorted out. However, as a - * preparation, we already use of_device_id to match a SoC description - * string against the SoC specific details of this driver. - */ static const struct of_device_id of_mvebu_mbus_ids[] = { { .compatible = "marvell,armada370-mbus", .data = &armada_370_xp_mbus_data, },