aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/zorro/zorro.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/zorro/zorro.c')
-rw-r--r--drivers/zorro/zorro.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/drivers/zorro/zorro.c b/drivers/zorro/zorro.c
index dff16d9767d8..a1585d6f6486 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;
@@ -160,15 +165,19 @@ static int __init zorro_init(void)
160 zorro_name_device(z); 165 zorro_name_device(z);
161 z->resource.name = z->name; 166 z->resource.name = z->name;
162 if (request_resource(zorro_find_parent_resource(z), &z->resource)) 167 if (request_resource(zorro_find_parent_resource(z), &z->resource))
163 printk(KERN_ERR "Zorro: Address space collision on device %s " 168 pr_err("Zorro: Address space collision on device %s %pR\n",
164 "[%lx:%lx]\n", 169 z->name, &z->resource);
165 z->name, (unsigned long)zorro_resource_start(z),
166 (unsigned long)zorro_resource_end(z));
167 sprintf(z->dev.bus_id, "%02x", i); 170 sprintf(z->dev.bus_id, "%02x", i);
168 z->dev.parent = &zorro_bus.dev; 171 z->dev.parent = &zorro_bus.dev;
169 z->dev.bus = &zorro_bus_type; 172 z->dev.bus = &zorro_bus_type;
170 device_register(&z->dev); 173 error = device_register(&z->dev);
171 zorro_create_sysfs_dev_files(z); 174 if (error) {
175 pr_err("Zorro: Error registering device %s\n", z->name);
176 continue;
177 }
178 error = zorro_create_sysfs_dev_files(z);
179 if (error)
180 dev_err(&z->dev, "Error creating sysfs files\n");
172 } 181 }
173 182
174 /* Mark all available Zorro II memory */ 183 /* Mark all available Zorro II memory */