crypto: hisilicon/debugfs - Fix debugfs uninit process issue
authorChenghai Huang <huangchenghai2@huawei.com>
Sun, 7 Apr 2024 07:59:53 +0000 (15:59 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 12 Apr 2024 07:07:52 +0000 (15:07 +0800)
commit8be0913389718e8d27c4f1d4537b5e1b99ed7739
tree93052edc4eab08f0a08f8d2354bbcc0b92716dba
parent5307147b5e2342b96cd1f1eb19e47e8d2c6c1428
crypto: hisilicon/debugfs - Fix debugfs uninit process issue

During the zip probe process, the debugfs failure does not stop
the probe. When debugfs initialization fails, jumping to the
error branch will also release regs, in addition to its own
rollback operation.

As a result, it may be released repeatedly during the regs
uninit process. Therefore, the null check needs to be added to
the regs uninit process.

Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/hisilicon/debugfs.c