mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
crypto: fix compilation warning
local variables size is more then recommended values leading to compilation warning. So usign this patch we are fixing below compilation warnigs:- nvidia-oot/drivers/crypto/tegra-nvvse-cryptodev.c: In function ‘tnvvse_crypto_dev_ioctl’: nvidia-oot/drivers/crypto/tegra-nvvse-cryptodev.c:2103:1: warning: the frame size of 2224 bytes is larger than 2048 bytes [-Wframe-larger-than=] Bug 4064812 Change-Id: Ie5f0489c9733451f9a132e146790a18d3dd4d6f9 Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2887287 Reviewed-by: Ashutosh Patel <ashutoshp@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Sandeep Trasi <strasi@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
1d627f6a49
commit
fe2085dcef
@@ -1880,7 +1880,7 @@ static long tnvvse_crypto_dev_ioctl(struct file *filp,
|
||||
struct tegra_nvvse_aes_gmac_init_ctl aes_gmac_init_ctl;
|
||||
struct tegra_nvvse_aes_gmac_sign_verify_ctl aes_gmac_sign_verify_ctl;
|
||||
struct tegra_nvvse_get_ivc_db get_ivc_db;
|
||||
struct tegra_nvvse_tsec_get_keyload_status tsec_keyload_status;
|
||||
struct tegra_nvvse_tsec_get_keyload_status *tsec_keyload_status;
|
||||
int ret = 0;
|
||||
|
||||
/*
|
||||
@@ -1892,6 +1892,12 @@ static long tnvvse_crypto_dev_ioctl(struct file *filp,
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
tsec_keyload_status = kzalloc(sizeof(*tsec_keyload_status), GFP_KERNEL);
|
||||
if (!tsec_keyload_status) {
|
||||
pr_err("%s(): failed to allocate memory\n", __func__);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
mutex_lock(&ctx->lock);
|
||||
|
||||
switch (ioctl_num) {
|
||||
@@ -2075,14 +2081,14 @@ static long tnvvse_crypto_dev_ioctl(struct file *filp,
|
||||
break;
|
||||
|
||||
case NVVSE_IOCTL_CMDID_TSEC_GET_KEYLOAD_STATUS:
|
||||
ret = tnvvse_crypto_tsec_get_keyload_status(ctx, &tsec_keyload_status);
|
||||
ret = tnvvse_crypto_tsec_get_keyload_status(ctx, tsec_keyload_status);
|
||||
if (ret) {
|
||||
pr_err("%s(): Failed to get keyload status:%d\n", __func__, ret);
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = copy_to_user((void __user *)arg, &tsec_keyload_status,
|
||||
sizeof(tsec_keyload_status));
|
||||
ret = copy_to_user((void __user *)arg, tsec_keyload_status,
|
||||
sizeof(*tsec_keyload_status));
|
||||
if (ret) {
|
||||
pr_err("%s(): Failed to copy_to_user tsec_keyload_status:%d\n",
|
||||
__func__, ret);
|
||||
|
||||
Reference in New Issue
Block a user