Commit d063f307 authored by Arnd Bergmann's avatar Arnd Bergmann

Merge tag 'optee-fix-for-v5.16' of...

Merge tag 'optee-fix-for-v5.16' of git://git.linaro.org/people/jens.wiklander/linux-tee into arm/fixes

Fix possible NULL pointer dereference in OP-TEE driver

* tag 'optee-fix-for-v5.16' of git://git.linaro.org/people/jens.wiklander/linux-tee:
  optee: fix kfree NULL pointer

Link: https://lore.kernel.org/r/20211117125747.GA2896197@jadeSigned-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents 3449d6bf c23ca66a
...@@ -810,10 +810,9 @@ static int optee_ffa_probe(struct ffa_device *ffa_dev) ...@@ -810,10 +810,9 @@ static int optee_ffa_probe(struct ffa_device *ffa_dev)
return -EINVAL; return -EINVAL;
optee = kzalloc(sizeof(*optee), GFP_KERNEL); optee = kzalloc(sizeof(*optee), GFP_KERNEL);
if (!optee) { if (!optee)
rc = -ENOMEM; return -ENOMEM;
goto err;
}
optee->pool = optee_ffa_config_dyn_shm(); optee->pool = optee_ffa_config_dyn_shm();
if (IS_ERR(optee->pool)) { if (IS_ERR(optee->pool)) {
rc = PTR_ERR(optee->pool); rc = PTR_ERR(optee->pool);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment