tee: remove unnecessary NULL check in tee_shm_alloc()

-----BEGIN PGP SIGNATURE-----
 
 iQJOBAABCgA4FiEEFV+gSSXZJY9ZyuB5LinzTIcAHJcFAl6wUeAaHGplbnMud2lr
 bGFuZGVyQGxpbmFyby5vcmcACgkQLinzTIcAHJf6tBAAsbutLZ+40T5GTLyFRRvU
 24xT5U7lqGeUqgvNf4KPj5oS7SsjxgyPFaH7g/NPmOUvEBrIE3uT/YSFW4NnPTpH
 YxJN1zF2fRIvAHueEWJDjhjXHGMXeLV0hQCDiREZTf/+H85SqafydwQtMMef/1VL
 FuZn80xjc5rwZ4f9AkLQ+etT/Ou9oRj22NLYAqMgexMqTzXK0FBjeIoGK3Kc558/
 eqKNG7B3vPxud4QxeRwmpdeTptKyjEEg7QPGgYis0fj1cgy0St4aXPMf1jp+chUk
 sMO8ptEJte/GJ17gamK6IY6s7tKA3PhFX7iqP1panKMVSJpyZ2yXNSe+o7irvckn
 s/kj+bcqyGD67DPqaBWJ0lfq5W3F3lfEytOq4ToY2XhGiiFav/TgI0UQbtT3hwxk
 zjPMeo9F5o6sJkJar3gPdA86CnbQr/f6xUZPpUcY+cB8yoHHMjwVRyr6mjlgv2zG
 vgu/w1N5l+InTYiWrKVIAHzhp0kRlbocbSWt+Pnt9ir5y4DilUZ6m9Gc+IzRO9Yc
 XJXiJ1hK2RmUuEdO1KEmYJlODUcH8IFBLjccd3O3Nq0wpv5K4WGj7wGeDf2V+QUg
 8GYbS19cnLjMC1rIoxhNlQlOOAXcStr6lqTyHTr0UDSouxbh3pZ5fxD5rUWDfl0J
 JyWj/2RbsWBEi2zAOl96Dik=
 =Ap1I
 -----END PGP SIGNATURE-----

Merge tag 'tee-smatch-for-5.8' of git://git.linaro.org/people/jens.wiklander/linux-tee into arm/drivers

tee: remove unnecessary NULL check in tee_shm_alloc()

* tag 'tee-smatch-for-5.8' of git://git.linaro.org/people/jens.wiklander/linux-tee:
  tee: remove unnecessary NULL check in tee_shm_alloc()

Link: https://lore.kernel.org/r/20200504181333.GA11018@jade
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Arnd Bergmann 2020-05-25 16:56:33 +02:00
commit 6d83d800b2

View File

@ -162,8 +162,7 @@ struct tee_shm *tee_shm_alloc(struct tee_context *ctx, size_t size, u32 flags)
}
}
if (ctx)
teedev_ctx_get(ctx);
teedev_ctx_get(ctx);
return shm;
err_rem: