tpm: remove kmalloc failure error message
The kmalloc failure message is just noise. Remove it and replace -EFAULT with -ENOMEM as standard for out of memory allocation error returns. Link: https://lore.kernel.org/linux-integrity/20250430083435.860146-1-colin.i.king@gmail.com/ Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
This commit is contained in:
committed by
Jarkko Sakkinen
parent
3d0ebc36b0
commit
8dc9c078ab
@@ -257,11 +257,8 @@ static int tpm1_ascii_bios_measurements_show(struct seq_file *m, void *v)
|
||||
(unsigned char *)(v + sizeof(struct tcpa_event));
|
||||
|
||||
eventname = kmalloc(MAX_TEXT_EVENT, GFP_KERNEL);
|
||||
if (!eventname) {
|
||||
printk(KERN_ERR "%s: ERROR - No Memory for event name\n ",
|
||||
__func__);
|
||||
return -EFAULT;
|
||||
}
|
||||
if (!eventname)
|
||||
return -ENOMEM;
|
||||
|
||||
/* 1st: PCR */
|
||||
seq_printf(m, "%2d ", do_endian_conversion(event->pcr_index));
|
||||
|
||||
Reference in New Issue
Block a user