From: Alessandro Zummo Date: Tue, 7 Mar 2006 22:48:29 +0000 (+0000) Subject: [ARM] 3353/1: NAS100d: protect nas100d_power_exit() with machine_is_nas100d() X-Git-Tag: v2.6.16-rc6~82^2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=744bfe4c25716a7cfc5690aeab8d572b43d7c916;p=linux-2.6-omap-h63xx.git [ARM] 3353/1: NAS100d: protect nas100d_power_exit() with machine_is_nas100d() Patch from Alessandro Zummo nas100d_power_exit(void) gets some protection to avoid freeing an irq when it is not appropriate to do so. Signed-off-by: Rod Whitby Signed-off-by: Alessandro Zummo Signed-off-by: Russell King --- diff --git a/arch/arm/mach-ixp4xx/nas100d-power.c b/arch/arm/mach-ixp4xx/nas100d-power.c index 2bec69bfa71..99d333d7ebd 100644 --- a/arch/arm/mach-ixp4xx/nas100d-power.c +++ b/arch/arm/mach-ixp4xx/nas100d-power.c @@ -56,6 +56,9 @@ static int __init nas100d_power_init(void) static void __exit nas100d_power_exit(void) { + if (!(machine_is_nas100d())) + return; + free_irq(NAS100D_RB_IRQ, NULL); }