patch-2.4.22 linux-2.4.22/arch/parisc/kernel/perf.c

Next file: linux-2.4.22/arch/parisc/kernel/processor.c
Previous file: linux-2.4.22/arch/parisc/kernel/pci-dma.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.21/arch/parisc/kernel/perf.c linux-2.4.22/arch/parisc/kernel/perf.c
@@ -499,6 +499,8 @@
  */
 static int __init perf_init(void)
 {
+	int ret;
+
 	/* Determine correct processor interface to use */
 	bitmask_array = perf_bitmasks;
 
@@ -517,11 +519,17 @@
 		return -ENODEV;
 	}
 
+	ret = misc_register(&perf_dev);
+	if (ret) {
+		printk(KERN_ERR "Performance monitoring counters: "
+			"cannot register misc device.\n");
+		return ret;
+	}
+
 	/* Patch the images to match the system */
     	perf_patch_images();
 
 	spin_lock_init(&perf_lock);
-	misc_register(&perf_dev);
 
 	/* TODO: this only lets us access the first cpu.. what to do for SMP? */
 	cpu_device = cpu_data[0].dev;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)