linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto: nx-842: Delete an error message for a failed memory allocation in nx842_pseries_init()
@ 2018-02-14 16:17 SF Markus Elfring
  2018-02-14 16:48 ` Dan Streetman
  2018-02-22 15:12 ` Herbert Xu
  0 siblings, 2 replies; 3+ messages in thread
From: SF Markus Elfring @ 2018-02-14 16:17 UTC (permalink / raw)
  To: linux-crypto, linuxppc-dev, Benjamin Herrenschmidt,
	David S. Miller, Haren Myneni, Herbert Xu, Michael Ellerman,
	Paul Mackerras
  Cc: LKML, kernel-janitors, Dan Streetman

From: Markus Elfring <elfring@users.sourceforge.net>
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 <elfring@users.sourceforge.net>
---
 drivers/crypto/nx/nx-842-pseries.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/nx/nx-842-pseries.c b/drivers/crypto/nx/nx-842-pseries.c
index bf52cd1d7fca..66869976cfa2 100644
--- a/drivers/crypto/nx/nx-842-pseries.c
+++ b/drivers/crypto/nx/nx-842-pseries.c
@@ -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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-22 15:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-14 16:17 [PATCH] crypto: nx-842: Delete an error message for a failed memory allocation in nx842_pseries_init() SF Markus Elfring
2018-02-14 16:48 ` Dan Streetman
2018-02-22 15:12 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).