Thread (29 messages) 29 messages, 9 authors, 2007-04-29

Re: [Cbe-oss-dev] [PATCH] cell: cbe_cpufreq cleanup and crash fix

From: Olof Johansson <hidden>
Date: 2007-04-27 05:32:20

On Fri, Apr 27, 2007 at 02:22:06PM +0900, Akinobu Mita wrote:
On Thu, Apr 26, 2007 at 06:07:54PM -0500, Olof Johansson wrote:
quoted
@@ -303,6 +303,9 @@ static int __init cbe_cpufreq_init(void)
 {
 	struct device_node *np;
 
+	if (!machine_is(cell))
+		return 0;
+
Please return -ENODEV to prevent loading module.

Otherwise it will cause crash when unloading the module
because of cpufreq_unregister_driver() with unregistered driver.
It won't crash due to the checks in cpufreq_unregister_driver(), but
it's still better to return failure.


Thanks,

-Olof
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help