mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-25 14:56:03 +00:00
tpm: remove superfluous check in tpm_tis_send()
Checking if variable chip is NULL after dereferencing it makes no sense. As discribed in [1] it is not expected that the variable can ever be NULL. [1] Re: [PATCH] tpm: avoid NULL pointer dereference in tpm_tis_send() https://lore.kernel.org/u-boot/YaFwDtKKYRr7qzWc@apalos.home/ Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
parent
dca7a8958f
commit
9086e8f04d
1 changed files with 0 additions and 3 deletions
|
@ -224,9 +224,6 @@ int tpm_tis_send(struct udevice *dev, const u8 *buf, size_t len)
|
||||||
u8 status;
|
u8 status;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!chip)
|
|
||||||
return -ENODEV;
|
|
||||||
|
|
||||||
ret = tpm_tis_request_locality(dev, 0);
|
ret = tpm_tis_request_locality(dev, 0);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
|
|
Loading…
Add table
Reference in a new issue