From: Neil Horman Date: Thu, 7 Dec 2006 04:37:08 +0000 (-0800) Subject: [PATCH] Correct misc_register return code handling in several drivers X-Git-Tag: v2.6.20-rc1~145^2^2~175 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d469ec0f40d65b2a0a704402990a43b2dafe197;p=pandora-kernel.git [PATCH] Correct misc_register return code handling in several drivers Clean up several code points in which the return code from misc_register is not handled properly. Several modules failed to deregister various hooks when misc_register fails, and this patch cleans them up. Also there are a few modules that legitimately don't care about the failure status of misc register. These drivers however unilaterally call misc_deregister on module unload. Since misc_register doesn't initialize the list_head in the init_routine if it fails, the deregister operation is at risk for oopsing when list_del is called. The initial solution was to manually init the list in the miscdev structure in each of those modules, but the consensus in this thread was to consolodate and do that universally inside misc_register. Signed-off-by: Neil Horman Cc: Bjorn Helgaas Cc: Kylene Jo Hall Cc: Dmitry Torokhov Cc: Olaf Hering Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed