aboutsummaryrefslogtreecommitdiff
path: root/arch/parisc/kernel/drivers.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-10-04 19:08:13 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-04 19:08:13 -0700
commit4b8447184ae85de4ce710e5f561fbaada21b8394 (patch)
tree71aed2c654a6d8d83beff480bc84d9e63b366858 /arch/parisc/kernel/drivers.c
parenta43cdf08a1b1ab3c013059b5fa4c1b7561e53cb7 (diff)
parent1604f31895dcdb42edf6511ce7ef0546ff92c8e5 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/willy/parisc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/willy/parisc-2.6: [PA-RISC] Fix time.c for new do_timer() calling convention [PA-RISC] Fix must_check warnings in drivers.c [PA-RISC] Fix parisc_newuname() [PA-RISC] Remove warning from pci.c [PA-RISC] Fix filldir warnings [PA-RISC] Fix sys32_sysctl [PA-RISC] Fix sba_iommu compilation
Diffstat (limited to 'arch/parisc/kernel/drivers.c')
-rw-r--r--arch/parisc/kernel/drivers.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/parisc/kernel/drivers.c b/arch/parisc/kernel/drivers.c
index 3d569a485a1..2b257e4f17d 100644
--- a/arch/parisc/kernel/drivers.c
+++ b/arch/parisc/kernel/drivers.c
@@ -424,7 +424,10 @@ struct parisc_device * create_tree_node(char id, struct device *parent)
/* make the generic dma mask a pointer to the parisc one */
dev->dev.dma_mask = &dev->dma_mask;
dev->dev.coherent_dma_mask = dev->dma_mask;
- device_register(&dev->dev);
+ if (!device_register(&dev->dev)) {
+ kfree(dev);
+ return NULL;
+ }
return dev;
}
@@ -850,8 +853,10 @@ static void print_parisc_device(struct parisc_device *dev)
*/
void init_parisc_bus(void)
{
- bus_register(&parisc_bus_type);
- device_register(&root);
+ if (!bus_register(&parisc_bus_type))
+ panic("Could not register PA-RISC bus type\n");
+ if (!device_register(&root))
+ panic("Could not register PA-RISC root device\n");
get_device(&root);
}