From: Henrique de Moraes Holschuh Date: Tue, 22 Jul 2008 00:18:18 +0000 (-0300) Subject: rfkill: fix led-trigger unregister order in error unwind X-Git-Tag: v2.6.27-rc2~119^2~6^2~32 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37f55e9d78d1b63047b1b7ae175cdce650547ba8;p=pandora-kernel.git rfkill: fix led-trigger unregister order in error unwind rfkill needs to unregister the led trigger AFTER a call to rfkill_remove_switch(), otherwise it will not update the LED state, possibly leaving it ON when it should be OFF. To make led-trigger unregistering safer, guard against unregistering a trigger twice, and also against issuing trigger events to a led trigger that was unregistered. This makes the error unwind paths more resilient. Refer to "rfkill: Register LED triggers before registering switch". Signed-off-by: Henrique de Moraes Holschuh Acked-by: Ivo van Doorn Cc: Michael Buesch Cc: Dmitry Baryshkov Signed-off-by: John W. Linville --- Reading git-diff-tree failed