[PATCH 2/3] arm: mach-mvebu: check result of of_match_node()

Ben Dooks ben.dooks at codethink.co.uk
Wed Jun 27 12:26:45 EDT 2012


Report if of_match_node() fails.

Signed-off-by: Ben Dooks <ben.dooks at codethink.co.uk>
---
 arch/arm/mach-mvebu/system-controller.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/mach-mvebu/system-controller.c b/arch/arm/mach-mvebu/system-controller.c
index f39023b..850f8d2 100644
--- a/arch/arm/mach-mvebu/system-controller.c
+++ b/arch/arm/mach-mvebu/system-controller.c
@@ -93,6 +93,7 @@ static int __init mvebu_system_controller_init(void)
 	if (np) {
 		const struct of_device_id *match =
 		    of_match_node(of_system_controller_table, np);
+		BUG_ON(!match);
 		system_controller_base = of_iomap(np, 0);
 		mvebu_sc = (struct mvebu_system_controller *)match->data;
 	}
-- 
1.7.10




More information about the linux-arm-kernel mailing list