.. | .. |
---|
9 | 9 | #include <linux/delay.h> |
---|
10 | 10 | #include <linux/spinlock.h> |
---|
11 | 11 | #include <linux/interrupt.h> |
---|
| 12 | +#include <linux/pgtable.h> |
---|
12 | 13 | #include <asm/prom.h> |
---|
13 | 14 | #include <linux/adb.h> |
---|
14 | 15 | #include <asm/io.h> |
---|
15 | | -#include <asm/pgtable.h> |
---|
16 | 16 | #include <asm/hydra.h> |
---|
17 | 17 | #include <asm/irq.h> |
---|
18 | 18 | #include <linux/init.h> |
---|
.. | .. |
---|
106 | 106 | return -ENXIO; |
---|
107 | 107 | } |
---|
108 | 108 | adb = ioremap(r.start, sizeof(struct adb_regs)); |
---|
| 109 | + if (!adb) { |
---|
| 110 | + of_node_put(adbs); |
---|
| 111 | + return -ENOMEM; |
---|
| 112 | + } |
---|
109 | 113 | |
---|
110 | 114 | out_8(&adb->ctrl.r, 0); |
---|
111 | 115 | out_8(&adb->intr.r, 0); |
---|