summaryrefslogtreecommitdiff
path: root/drivers/crypto/nx
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2018-02-14 19:05:13 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2018-02-22 17:16:39 +0300
commit8c48db9a63e1ef9045a4de9ccc004a306dc3b932 (patch)
treeb94424bc9e89fa9eb760de6eb35dff15f051f9bb /drivers/crypto/nx
parenta8bc22f35c347d81aa6108cc9b19ccc05560e3a9 (diff)
downloadlinux-8c48db9a63e1ef9045a4de9ccc004a306dc3b932.tar.xz
crypto: nx-842 - Delete an error message for a failed memory allocation in nx842_pseries_init()
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> Reviewed-by: Dan Streetman <ddstreet@ieee.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/nx')
-rw-r--r--drivers/crypto/nx/nx-842-pseries.c5
1 files 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);