From: James Hogan Date: Sat, 1 Mar 2014 22:52:25 +0000 (-0300) Subject: [media] rc-main: fix missing unlock if no devno left X-Git-Tag: v3.15-rc1~85^2~68 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=262912335c823a2bbcc87003ee55d62cc27f4e48;p=pandora-kernel.git [media] rc-main: fix missing unlock if no devno left While playing with make coccicheck I noticed this message: drivers/media/rc/rc-main.c:1245:3-9: preceding lock on line 1238 It was introduced by commit 587d1b06e07b ([media] rc-core: reuse device numbers) which returns -ENOMEM after a mutex_lock without first unlocking it when there are no more device numbers left. The added code doesn't depend on the device lock, so move it before the lock is taken. Signed-off-by: James Hogan Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed