diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2018-02-14 17:05:13 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2018-02-22 22:16:39 +0800 |
commit | 8c48db9a63e1ef9045a4de9ccc004a306dc3b932 (patch) | |
tree | b94424bc9e89fa9eb760de6eb35dff15f051f9bb /drivers | |
parent | a8bc22f35c347d81aa6108cc9b19ccc05560e3a9 (diff) | |
download | linux-stable-8c48db9a63e1ef9045a4de9ccc004a306dc3b932.tar.gz linux-stable-8c48db9a63e1ef9045a4de9ccc004a306dc3b932.tar.bz2 linux-stable-8c48db9a63e1ef9045a4de9ccc004a306dc3b932.zip |
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')
-rw-r--r-- | drivers/crypto/nx/nx-842-pseries.c | 5 |
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); |