diff options
Diffstat (limited to 'drivers/zorro/zorro.c')
-rw-r--r-- | drivers/zorro/zorro.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/zorro/zorro.c b/drivers/zorro/zorro.c index dff16d9767d8..2dda20ac6b36 100644 --- a/drivers/zorro/zorro.c +++ b/drivers/zorro/zorro.c | |||
@@ -130,6 +130,7 @@ static int __init zorro_init(void) | |||
130 | { | 130 | { |
131 | struct zorro_dev *z; | 131 | struct zorro_dev *z; |
132 | unsigned int i; | 132 | unsigned int i; |
133 | int error; | ||
133 | 134 | ||
134 | if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(ZORRO)) | 135 | if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(ZORRO)) |
135 | return 0; | 136 | return 0; |
@@ -140,7 +141,11 @@ static int __init zorro_init(void) | |||
140 | /* Initialize the Zorro bus */ | 141 | /* Initialize the Zorro bus */ |
141 | INIT_LIST_HEAD(&zorro_bus.devices); | 142 | INIT_LIST_HEAD(&zorro_bus.devices); |
142 | strcpy(zorro_bus.dev.bus_id, "zorro"); | 143 | strcpy(zorro_bus.dev.bus_id, "zorro"); |
143 | device_register(&zorro_bus.dev); | 144 | error = device_register(&zorro_bus.dev); |
145 | if (error) { | ||
146 | pr_err("Zorro: Error registering zorro_bus\n"); | ||
147 | return error; | ||
148 | } | ||
144 | 149 | ||
145 | /* Request the resources */ | 150 | /* Request the resources */ |
146 | zorro_bus.num_resources = AMIGAHW_PRESENT(ZORRO3) ? 4 : 2; | 151 | zorro_bus.num_resources = AMIGAHW_PRESENT(ZORRO3) ? 4 : 2; |
@@ -167,8 +172,14 @@ static int __init zorro_init(void) | |||
167 | sprintf(z->dev.bus_id, "%02x", i); | 172 | sprintf(z->dev.bus_id, "%02x", i); |
168 | z->dev.parent = &zorro_bus.dev; | 173 | z->dev.parent = &zorro_bus.dev; |
169 | z->dev.bus = &zorro_bus_type; | 174 | z->dev.bus = &zorro_bus_type; |
170 | device_register(&z->dev); | 175 | error = device_register(&z->dev); |
171 | zorro_create_sysfs_dev_files(z); | 176 | if (error) { |
177 | pr_err("Zorro: Error registering device %s\n", z->name); | ||
178 | continue; | ||
179 | } | ||
180 | error = zorro_create_sysfs_dev_files(z); | ||
181 | if (error) | ||
182 | dev_err(&z->dev, "Error creating sysfs files\n"); | ||
172 | } | 183 | } |
173 | 184 | ||
174 | /* Mark all available Zorro II memory */ | 185 | /* Mark all available Zorro II memory */ |