diff options
-rw-r--r-- | arch/powerpc/sysdev/mv64x60_dev.c | 42 |
1 files changed, 26 insertions, 16 deletions
diff --git a/arch/powerpc/sysdev/mv64x60_dev.c b/arch/powerpc/sysdev/mv64x60_dev.c index c8d9257f431b..41af1223e2a0 100644 --- a/arch/powerpc/sysdev/mv64x60_dev.c +++ b/arch/powerpc/sysdev/mv64x60_dev.c | |||
@@ -431,9 +431,13 @@ static int __init mv64x60_device_setup(void) | |||
431 | int err; | 431 | int err; |
432 | 432 | ||
433 | id = 0; | 433 | id = 0; |
434 | for_each_compatible_node(np, "serial", "marvell,mv64360-mpsc") | 434 | for_each_compatible_node(np, "serial", "marvell,mv64360-mpsc") { |
435 | if ((err = mv64x60_mpsc_device_setup(np, id++))) | 435 | err = mv64x60_mpsc_device_setup(np, id++); |
436 | goto error; | 436 | if (err) |
437 | printk(KERN_ERR "Failed to initialize MV64x60 " | ||
438 | "serial device %s: error %d.\n", | ||
439 | np->full_name, err); | ||
440 | } | ||
437 | 441 | ||
438 | id = 0; | 442 | id = 0; |
439 | id2 = 0; | 443 | id2 = 0; |
@@ -441,38 +445,44 @@ static int __init mv64x60_device_setup(void) | |||
441 | pdev = mv64x60_eth_register_shared_pdev(np, id++); | 445 | pdev = mv64x60_eth_register_shared_pdev(np, id++); |
442 | if (IS_ERR(pdev)) { | 446 | if (IS_ERR(pdev)) { |
443 | err = PTR_ERR(pdev); | 447 | err = PTR_ERR(pdev); |
444 | goto error; | 448 | printk(KERN_ERR "Failed to initialize MV64x60 " |
449 | "network block %s: error %d.\n", | ||
450 | np->full_name, err); | ||
451 | continue; | ||
445 | } | 452 | } |
446 | for_each_child_of_node(np, np2) { | 453 | for_each_child_of_node(np, np2) { |
447 | if (!of_device_is_compatible(np2, | 454 | if (!of_device_is_compatible(np2, |
448 | "marvell,mv64360-eth")) | 455 | "marvell,mv64360-eth")) |
449 | continue; | 456 | continue; |
450 | err = mv64x60_eth_device_setup(np2, id2++, pdev); | 457 | err = mv64x60_eth_device_setup(np2, id2++, pdev); |
451 | if (err) { | 458 | if (err) |
452 | of_node_put(np2); | 459 | printk(KERN_ERR "Failed to initialize " |
453 | goto error; | 460 | "MV64x60 network device %s: " |
454 | } | 461 | "error %d.\n", |
462 | np2->full_name, err); | ||
455 | } | 463 | } |
456 | } | 464 | } |
457 | 465 | ||
458 | id = 0; | 466 | id = 0; |
459 | for_each_compatible_node(np, "i2c", "marvell,mv64360-i2c") | 467 | for_each_compatible_node(np, "i2c", "marvell,mv64360-i2c") { |
460 | if ((err = mv64x60_i2c_device_setup(np, id++))) | 468 | err = mv64x60_i2c_device_setup(np, id++); |
461 | goto error; | 469 | if (err) |
470 | printk(KERN_ERR "Failed to initialize MV64x60 I2C " | ||
471 | "bus %s: error %d.\n", | ||
472 | np->full_name, err); | ||
473 | } | ||
462 | 474 | ||
463 | /* support up to one watchdog timer */ | 475 | /* support up to one watchdog timer */ |
464 | np = of_find_compatible_node(np, NULL, "marvell,mv64360-wdt"); | 476 | np = of_find_compatible_node(np, NULL, "marvell,mv64360-wdt"); |
465 | if (np) { | 477 | if (np) { |
466 | if ((err = mv64x60_wdt_device_setup(np, id))) | 478 | if ((err = mv64x60_wdt_device_setup(np, id))) |
467 | goto error; | 479 | printk(KERN_ERR "Failed to initialize MV64x60 " |
480 | "Watchdog %s: error %d.\n", | ||
481 | np->full_name, err); | ||
468 | of_node_put(np); | 482 | of_node_put(np); |
469 | } | 483 | } |
470 | 484 | ||
471 | return 0; | 485 | return 0; |
472 | |||
473 | error: | ||
474 | of_node_put(np); | ||
475 | return err; | ||
476 | } | 486 | } |
477 | arch_initcall(mv64x60_device_setup); | 487 | arch_initcall(mv64x60_device_setup); |
478 | 488 | ||