summaryrefslogtreecommitdiff
path: root/security/apparmor
diff options
context:
space:
mode:
authorXiu Jianfeng <xiujianfeng@huawei.com>2023-08-09 10:02:44 +0000
committerJohn Johansen <john.johansen@canonical.com>2023-10-15 21:44:31 -0700
commit5ebb39eb90376fbf098df04be8b58f235a14ce5a (patch)
treee222d90706301b2421875ea2df5bc0cff9aed223 /security/apparmor
parent8884ba07786c718771cf7b78cb3024924b27ec2b (diff)
apparmor: remove unneeded #ifdef in decompress_zstd()
The whole function is guarded by CONFIG_SECURITY_APPARMOR_EXPORT_BINARY, so the #ifdef here is redundant, remove it. Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com> Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor')
-rw-r--r--security/apparmor/apparmorfs.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c
index 0e8d690c911b..37234e385fd1 100644
--- a/security/apparmor/apparmorfs.c
+++ b/security/apparmor/apparmorfs.c
@@ -1314,7 +1314,6 @@ SEQ_RAWDATA_FOPS(compressed_size);
static int decompress_zstd(char *src, size_t slen, char *dst, size_t dlen)
{
-#ifdef CONFIG_SECURITY_APPARMOR_EXPORT_BINARY
if (slen < dlen) {
const size_t wksp_len = zstd_dctx_workspace_bound();
zstd_dctx *ctx;
@@ -1341,7 +1340,6 @@ cleanup:
kvfree(wksp);
return ret;
}
-#endif
if (dlen < slen)
return -EINVAL;