parisc/kernel/pci-dma: Audit return code of create_proc_*
PATCH 1/1 parisc/kernel/pci-dma: Audit return code of create_proc_*
From: Christophe Lucas <[email protected]>
--- pci-dma.c | 30 ++++++++++++++++++++---------- 1 files changed, 20 insertions(+), 10 deletions(-)
arch/parisc/kernel/pci-dma.c +20 -10
@@ -333,18 +333,28 @@ pcxl_free_range(unsigned long vaddr, sizstatic int __init pcxl_dma_init (void ) { -if (pcxl_dma_start ==0 ) -return 0 ; +if (pcxl_dma_start ==0 ) +return 0 ; -spin_lock_init (&pcxl_res_lock); - pcxl_res_size =PCXL_DMA_MAP_SIZE >> (PAGE_SHIFT +3 ); - pcxl_res_hint =0 ; - pcxl_res_map = (char *)__get_free_pages (GFP_KERNEL , +spin_lock_init (&pcxl_res_lock); + pcxl_res_size =PCXL_DMA_MAP_SIZE >> (PAGE_SHIFT +3 ); + pcxl_res_hint =0 ; + pcxl_res_map = (char *)__get_free_pages (GFP_KERNEL ,get_order (pcxl_res_size)); -memset (pcxl_res_map,0 , pcxl_res_size); - proc_gsc_root =proc_mkdir ("gsc" ,0 ); -create_proc_info_entry ("dino" ,0 , proc_gsc_root, pcxl_proc_info); -return 0 ; +memset (pcxl_res_map,0 , pcxl_res_size); + proc_gsc_root =proc_mkdir ("gsc" ,0 ); +if (!proc_gsc_root) +printk (KERN_WARNING +"pcxl_dma_init: Unable to create gsc /proc dir entry\n" ); +else { +struct proc_dir_entry * ent; + ent =create_proc_info_entry ("dino" ,0 , + proc_gsc_root, pcxl_proc_info); +if (!ent) +printk (KERN_WARNING +"pci-dma.c: Unable to create dino /proc entry.\n" ); + } +return 0 ; }__initcall (pcxl_dma_init);
--
_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux