Bluetooth: Delete error messages for failed memory allocations in two functions
Subsystems (5)
PATCH 1/1 Bluetooth: Delete error messages for failed memory allocations in two functions
From: Markus Elfring <[email protected]>
Date: Mon, 22 May 2017 08:42:28 +0200
Omit two extra messages for memory allocation failures in these functions.
This issue was detected by using the Coccinelle software.
Signed-off-by Markus Elfring <[email protected]>
--- net/bluetooth/ecdh_helper.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)
net/bluetooth/ecdh_helper.c +3 -8
@@ -92,8 +92,6 @@ bool compute_ecdh_secret(const u8 public_key[64], const u8 private_key[32], -if (!buf) { -pr_err ("alg: kpp: Failed to allocate %d bytes for buf\n" , - buf_len); +if (!buf) goto free_req; - } +crypto_ecdh_encode_key (buf, buf_len, &p);/* Set A private Key */
@@ -173,8 +171,5 @@ bool generate_ecdh_keys(u8 public_key[64], u8 private_key[32]) -if (!buf) { -pr_err ("alg: kpp: Failed to allocate %d bytes for buf\n" , - buf_len); +if (!buf) goto free_req; - } do { if (tries++ >= max_tries)
Signature · 1 line
2.13.0
Marcel Holtmann
maintainerHallo Markus,
Quoted 9 lines
Omit two extra messages for memory allocation failures in these functions.
This issue was detected by using the Coccinelle software.
Signed-off-by Markus Elfring <[email protected]>---
net/bluetooth/ecdh_helper.c| 11 +++--------1 file changed, 3 insertions(+), 8 deletions(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel