From: Wei Yongjun Date: Mon, 22 Oct 2012 05:22:15 +0000 (+0800) Subject: Staging: ced1401: fix missing unlock on error in FreeCircBlock() X-Git-Tag: v3.8-rc1~178^2~1120 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a5e0f69c983a142daa95b70f709a3dabf76cb55f;p=platform%2Fupstream%2Fkernel-adaptation-pc.git Staging: ced1401: fix missing unlock on error in FreeCircBlock() Add the missing unlock on the error handle path in function FreeCircBlock(). Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ced1401/ced_ioc.c b/drivers/staging/ced1401/ced_ioc.c index c9492ed..5813aee 100644 --- a/drivers/staging/ced1401/ced_ioc.c +++ b/drivers/staging/ced1401/ced_ioc.c @@ -1508,7 +1508,7 @@ int FreeCircBlock(DEVICE_EXTENSION * pdx, TCIRCBLOCK __user * pCB) iReturn = U14ERR_BADAREA; if (copy_to_user(pCB, &cb, sizeof(cb))) - return -EFAULT; + iReturn = -EFAULT; mutex_unlock(&pdx->io_mutex); return iReturn;