This function can fail. In this case we should return the error rather than
swallowing it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
int arch_misc_init(void)
{
int arch_misc_init(void)
{
- pirq_init();
-
- return 0;
- if (create_pirq_routing_table()) {
+ ret = create_pirq_routing_table();
+ if (ret) {
debug("Failed to create pirq routing table\n");
debug("Failed to create pirq routing table\n");
- } else {
- /* Route PIRQ */
- pirq_route_irqs(pirq_routing_table->slots,
- get_irq_slot_count(pirq_routing_table));
+ /* Route PIRQ */
+ pirq_route_irqs(pirq_routing_table->slots,
+ get_irq_slot_count(pirq_routing_table));
+
+ return 0;
}
u32 write_pirq_routing_table(u32 addr)
}
u32 write_pirq_routing_table(u32 addr)
int arch_misc_init(void)
{
int arch_misc_init(void)
{
- pirq_init();
-
- return 0;
int arch_misc_init(void)
{
int arch_misc_init(void)
{
- pirq_init();
-
- return 0;
int arch_misc_init(void)
{
int arch_misc_init(void)
{
- pirq_init();
-
- return 0;
*
* This initializes the PIRQ routing on the platform and configures all PCI
* devices' interrupt line register to a working IRQ number on the 8259 PIC.
*
* This initializes the PIRQ routing on the platform and configures all PCI
* devices' interrupt line register to a working IRQ number on the 8259 PIC.
+ *
+ * @return 0 if OK, -ve on error
#endif /* _ARCH_IRQ_H_ */
#endif /* _ARCH_IRQ_H_ */