diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-04 19:08:13 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-04 19:08:13 -0700 |
commit | 4b8447184ae85de4ce710e5f561fbaada21b8394 (patch) | |
tree | 71aed2c654a6d8d83beff480bc84d9e63b366858 /arch/parisc/kernel/drivers.c | |
parent | a43cdf08a1b1ab3c013059b5fa4c1b7561e53cb7 (diff) | |
parent | 1604f31895dcdb42edf6511ce7ef0546ff92c8e5 (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.c | 11 |
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); } |