From: Dan Carpenter Date: Wed, 17 Nov 2010 05:12:23 +0000 (-0300) Subject: [media] lirc_dev: stray unlock in lirc_dev_fop_poll() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5c769a68beaee924e1dc90bf06e1b087b1d46237;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git [media] lirc_dev: stray unlock in lirc_dev_fop_poll() We shouldn't unlock here. I think this was a cut and paste error. Signed-off-by: Dan Carpenter Acked-by: Jarod Wilson Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/IR/lirc_dev.c b/drivers/media/IR/lirc_dev.c index 8418b14ee4d2..8ab9d87f3a46 100644 --- a/drivers/media/IR/lirc_dev.c +++ b/drivers/media/IR/lirc_dev.c @@ -522,10 +522,8 @@ unsigned int lirc_dev_fop_poll(struct file *file, poll_table *wait) dev_dbg(ir->d.dev, LOGHEAD "poll called\n", ir->d.name, ir->d.minor); - if (!ir->attached) { - mutex_unlock(&ir->irctl_lock); + if (!ir->attached) return POLLERR; - } poll_wait(file, &ir->buf->wait_poll, wait);