crypto: nx-842 - Delete an error message for a failed memory allocation in nx842_pser...
authorMarkus Elfring <elfring@users.sourceforge.net>
Wed, 14 Feb 2018 16:05:13 +0000 (17:05 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 22 Feb 2018 14:16:39 +0000 (22:16 +0800)
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>
drivers/crypto/nx/nx-842-pseries.c

index bf52cd1..6686997 100644 (file)
@@ -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);