mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
crypto: hisilicon/qm - fix missing put dfx access
[ Upstream commit5afc904f44] In function qm_cmd_write(), if function returns from branch 'atomic_read(&qm->status.flags) == QM_STOP', the got dfx access is forgotten to put. Fixes:607c191b37("crypto: hisilicon - support runtime PM for accelerator device") Signed-off-by: Weili Qian <qianweili@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
014f989381
commit
8ecd63a0cc
@@ -2245,8 +2245,10 @@ static ssize_t qm_cmd_write(struct file *filp, const char __user *buffer,
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
/* Judge if the instance is being reset. */
|
/* Judge if the instance is being reset. */
|
||||||
if (unlikely(atomic_read(&qm->status.flags) == QM_STOP))
|
if (unlikely(atomic_read(&qm->status.flags) == QM_STOP)) {
|
||||||
return 0;
|
ret = 0;
|
||||||
|
goto put_dfx_access;
|
||||||
|
}
|
||||||
|
|
||||||
if (count > QM_DBG_WRITE_LEN) {
|
if (count > QM_DBG_WRITE_LEN) {
|
||||||
ret = -ENOSPC;
|
ret = -ENOSPC;
|
||||||
|
|||||||
Reference in New Issue
Block a user