[PATCH 2/4] powerpc: mv64x60 - Exit when no hs_reg_valid property

Mark A. Greer mgreer at mvista.com
Tue Jan 15 09:58:34 EST 2008


From: Mark A. Greer <mgreer at mvista.com>

mv64x60_sysfs_init() should exit as soon as it discovers there is no
'hs_reg_valid' property in the Device Tree.

Signed-off-by: Mark A. Greer <mgreer at mvista.com>
---
 arch/powerpc/sysdev/mv64x60_pci.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/powerpc/sysdev/mv64x60_pci.c b/arch/powerpc/sysdev/mv64x60_pci.c
index 2115177..7cc1abf 100644
--- a/arch/powerpc/sysdev/mv64x60_pci.c
+++ b/arch/powerpc/sysdev/mv64x60_pci.c
@@ -97,6 +97,8 @@ static int __init mv64x60_sysfs_init(void)
 
 	prop = of_get_property(np, "hs_reg_valid", NULL);
 	of_node_put(np);
+	if (!prop)
+		return 0;
 
 	pdev = platform_device_register_simple("marvell,mv64360", 0, NULL, 0);
 	if (IS_ERR(pdev))



More information about the Linuxppc-dev mailing list