Commit dc0e2470 authored by Arnd Bergmann's avatar Arnd Bergmann

Merge tag 'optee-fix-for-6.1' of...

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

Fix possible memory leak in optee_register_device()

* tag 'optee-fix-for-6.1' of https://git.linaro.org/people/jens.wiklander/linux-tee:
  tee: optee: fix possible memory leak in optee_register_device()

Link: https://lore.kernel.org/r/Y3d2OuJ60U30OkZe@jadeSigned-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents eb708140 cce616e0
...@@ -80,7 +80,7 @@ static int optee_register_device(const uuid_t *device_uuid) ...@@ -80,7 +80,7 @@ static int optee_register_device(const uuid_t *device_uuid)
rc = device_register(&optee_device->dev); rc = device_register(&optee_device->dev);
if (rc) { if (rc) {
pr_err("device registration failed, err: %d\n", rc); pr_err("device registration failed, err: %d\n", rc);
kfree(optee_device); put_device(&optee_device->dev);
} }
return rc; return rc;
......
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