tpm: remove kmalloc failure error message
Subsystems (3)
PATCH v4 1/1 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.
---
V1: remove trailing space after \n
V2: remove entire message, originally just removed a trailing space
V3: replace -EFAULT with -ENOMEM
V4: send correct fix for V3, actually return -ENOMEM
---
drivers/char/tpm/eventlog/tpm1.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/char/tpm/eventlog/tpm1.c +2 -5
@@ -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));
Signature · 1 line
2.49.0
Quoted 12 lines · Colin Ian King
The kmalloc failure message is just noise. Remove it and replace
-EFAULTwith-ENOMEMas standard for out of memory allocation error returns.Signed-off-by Colin Ian King <[email protected]>---
V1: remove trailing space after \n
V2: remove entire message, originally just removed a trailing space
V3: replace-EFAULTwith-ENOMEM
V4: send correct fix for V3, actually return-ENOMEM
---
Quoted 2 lines
drivers/char/tpm/eventlog/tpm1.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
Jason
Quoted 36 lines · Colin Ian King
The kmalloc failure message is just noise. Remove it and replace
-EFAULTwith-ENOMEMas standard for out of memory allocation error returns.Signed-off-by Colin Ian King <[email protected]>---
V1: remove trailing space after \n
V2: remove entire message, originally just removed a trailing space
V3: replace-EFAULTwith-ENOMEM
V4: send correct fix for V3, actually return-ENOMEM
---drivers/char/tpm/eventlog/tpm1.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)drivers/char/tpm/eventlog/tpm1.c +2
-5@@ -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));Signature · 1 line
2.49.0
Ya, I think this make sense.
BR, Jarkko