diff options
author | Daiane Angolini <daiane.angolini@foundries.io> | 2022-07-11 08:54:38 -0300 |
---|---|---|
committer | Daiane Angolini <daiane.angolini@foundries.io> | 2022-07-11 08:54:38 -0300 |
commit | 6d5d44ccd4eb52e4e467fb61c20d3c2c7d220d2b (patch) | |
tree | 1daeac33277273f3f8f286f5e587d66a54d2dc01 /drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c | |
parent | fa6c3168595c02bd9d5366fcc28c9e7304947a3d (diff) | |
parent | bc2e851e616a4d109669322f94102d1a763dbd82 (diff) |
Merge branch 'local/v5.15.33' into 5.15.32-2.0.0
This is the 5.15.33 stable release
Files which conflict can cause problem in future:
drivers/clk/imx/clk-imx8qxp-lpcg.c
reverted:
4b8a71f206c94445317179b79d7f91996f40dcfc clk: imx: off by one in imx_lpcg_parse_clks_from_dt()
drivers/mailbox/imx-mailbox.c
e8d90d8901e42f9ac039086af9f1829030204fa8 MLK-25649-4 mailbox: imx: Add support for identifying SCU wakeup source from sysfs
security/keys/trusted-keys/trusted_core.c
ae82e852ca1b899e936c02859c18a80467901b2f KEYS: trusted: allow use of TEE as backend without TCG_TPM support
Signed-off-by: Daiane Angolini <daiane.angolini@foundries.io>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c b/drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c index 667fa016496e..a6ea89a5d51a 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c @@ -142,11 +142,12 @@ nvkm_acr_hsfw_load_bl(struct nvkm_acr *acr, const char *name, int ver, hsfw->imem_size = desc->code_size; hsfw->imem_tag = desc->start_tag; - hsfw->imem = kmalloc(desc->code_size, GFP_KERNEL); - memcpy(hsfw->imem, data + desc->code_off, desc->code_size); - + hsfw->imem = kmemdup(data + desc->code_off, desc->code_size, GFP_KERNEL); nvkm_firmware_put(fw); - return 0; + if (!hsfw->imem) + return -ENOMEM; + else + return 0; } int |