From: Dan Carpenter Date: Thu, 17 Mar 2011 11:43:07 +0000 (+0300) Subject: genirq: Fix incorrect unlock in __setup_irq() X-Git-Tag: v3.12-rc1~6883^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1c389795c15d349c2c7b23baf927e16e86ca3ae8;p=kernel%2Fkernel-generic.git genirq: Fix incorrect unlock in __setup_irq() goto out_thread is called before we take the lock. It causes a gcc warning: "kernel/irq/manage.c:858: warning: ‘flags’ may be used uninitialized in this function" [ tglx: Moved unlock before free_cpumask_var() ] Signed-off-by: Dan Carpenter LKML-Reference: <20110317114307.GJ2008@bicker> Signed-off-by: Thomas Gleixner --- diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index acd599a..0a2aa73 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -1064,10 +1064,10 @@ mismatch: ret = -EBUSY; out_mask: + raw_spin_unlock_irqrestore(&desc->lock, flags); free_cpumask_var(mask); out_thread: - raw_spin_unlock_irqrestore(&desc->lock, flags); if (new->thread) { struct task_struct *t = new->thread;