[media] mem2mem_testdev: unlock and return error code properly
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 14 Aug 2012 05:58:56 +0000 (02:58 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 15 Aug 2012 21:50:27 +0000 (18:50 -0300)
commita7bd775628006f7da1b94d7a5def6746f55f2321
treedc017300a1cecfbac681cd3d9abc38129db841d9
parente36c92fd63bb4773e6f4bc38ecee11a609ded1cf
[media] mem2mem_testdev: unlock and return error code properly

We recently added locking to this function, but there was an error path
which accidentally returned holding a lock.  Also we returned zero on
failure on some paths instead of the error code.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/platform/mem2mem_testdev.c