crypto: nx-842: Delete an error message for a failed memory allocation in nx842_pseries_init()
PATCH 1/1 crypto: nx-842: Delete an error message for a failed memory allocation in nx842_pseries_init()
From: Markus Elfring <[email protected]>
Date: Wed, 14 Feb 2018 17:05:13 +0100
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by Markus Elfring <[email protected]>
--- drivers/crypto/nx/nx-842-pseries.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/crypto/nx/nx-842-pseries.c +2 -3
@@ -1105,10 +1105,9 @@ static int __init nx842_pseries_init(void)RCU_INIT_POINTER (devdata,NULL ); new_devdata =kzalloc (sizeof (*new_devdata),GFP_KERNEL ); -if (!new_devdata) { -pr_err ("Could not allocate memory for device data\n" ); +if (!new_devdata)return -ENOMEM ; - } +RCU_INIT_POINTER (devdata, new_devdata); ret =vio_register_driver (&nx842_vio_driver);
Signature · 1 line
2.16.1
Quoted 8 lines · SF Markus Elfring
From: Markus Elfring <[email protected]>
Date: Wed, 14 Feb 2018 17:05:13 +0100Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by Markus Elfring <[email protected]>
Reviewed-by Dan Streetman <[email protected]>
Quoted 24 lines
--- drivers/crypto/nx/nx-842-pseries.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/crypto/nx/nx-842-pseries.c +2
-4@@ -1105,10 +1105,9 @@ static int __init nx842_pseries_init(void)RCU_INIT_POINTER (devdata,NULL ); new_devdata =kzalloc (sizeof (*new_devdata),GFP_KERNEL ); -if (!new_devdata) { -pr_err ("Could not allocate memory for device data\n" ); +if (!new_devdata)return -ENOMEM ; - } +RCU_INIT_POINTER (devdata, new_devdata); ret =vio_register_driver (&nx842_vio_driver); --2.16.1
Herbert Xu
maintainerQuoted 8 lines · SF Markus Elfring
From: Markus Elfring <[email protected]>
Date: Wed, 14 Feb 2018 17:05:13 +0100Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by Markus Elfring <[email protected]>
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt