From patchwork Wed Feb 14 16:17:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 873745 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zhtQy3FVHz9t2l for ; Thu, 15 Feb 2018 21:52:58 +1100 (AEDT) Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3zhtQy22kwzF1L5 for ; Thu, 15 Feb 2018 21:52:58 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=users.sourceforge.net (client-ip=212.227.15.4; helo=mout.web.de; envelope-from=elfring@users.sourceforge.net; receiver=) Received: from mout.web.de (mout.web.de [212.227.15.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3zhtP82YRRzF1KK for ; Thu, 15 Feb 2018 21:51:22 +1100 (AEDT) Received: from [192.168.1.2] ([78.48.82.239]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MeSLv-1f9sgf0mZb-00QAMP; Wed, 14 Feb 2018 17:17:14 +0100 To: linux-crypto@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Benjamin Herrenschmidt , "David S. Miller" , Haren Myneni , Herbert Xu , Michael Ellerman , Paul Mackerras From: SF Markus Elfring Subject: [PATCH] crypto: nx-842: Delete an error message for a failed memory allocation in nx842_pseries_init() Message-ID: <8261d041-ccd9-c0f8-4530-a4afb43ee7ab@users.sourceforge.net> Date: Wed, 14 Feb 2018 17:17:08 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Language: en-US X-Provags-ID: V03:K0:8Bvk4874i74Vk48Yl2qNJlTmngwsa8qGcevg2nGjvaElkU7Hoyw ii2ABystiEFy+gR7w7xy4bJzxKGxvGwe6Mao2lWipQuoHo0i3DIWGm8R4UEC7+RhaSIJTT9 goaFnT+SPYjoXfzMygfp8x/4BsN+iJI3o57HRdV4u/sNAO6Ep9j4TXFlXw9AGFf89ahG18v zC4mh1aBvnO5kEZGh54sQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:HERJ+bcO078=:KX1oK5aHY/6jeNezKP8W6l QWcADSb1/r0J81QcZcE1TastW+BgQgVY+etl8r0t9SUqwrlyFfY54GpS6wwD1yHmdEonBEZ3X TlMnYymR73aiLuRkWTrMEmuV31iCghNinbW5x4nqECBj3Ujf4t9psVP2H7hb1GajIk2fN9Ic3 ldxlalFdxokZhCYJdMwlizFy6FCixre1W3dCzugrFEfoXGkKYobHJ57sfYSGeiXiW1YvsjdL8 lpGg02oguZgkCMPsIFIwbUibyYJziCfpB9GNiS/wdAjmA/vN8lt4QxQ5QiyJZQzflt1L2Q88A +Y1KoHstlfAuQqIlJ0t4RlQwUlmR7rdbJEiG3uifpiKxhJUteHP5Wo26cUJ+rBhDNFpNBk7Dt ktLktMyrxuLMdWxG48q3Fb8H45Kl+gw4BGsQmnA8dkPiJ2EZEat8dqBGKOqqE1dybQjPjrNYl 0xMuDhbxSpLRMPV3YJKQJccmb+kZiRqT0fSehcaHDa9hvHhi/xMsitDYWRKhp6SOw0wxQcRYt Pi1UVi5FB77Evnz/UCKxR+xwqFl7yMwBqVpkoD7BqrrbmTjWa6C/fCjDNmYf/3MLx1DpG7LEe 9axy74W48xRN9ymYNs7WNGnUIMDH/xerIXnMhtfN8/XVd2ltNZ2r9AFYKLmfu6ePSWcRDTovR txkJLIqYuEGItVyiSbh22FTU+G9+zzk1/ODihFKYZkxiB3gGqSDMtNy6DTE/dwAcmxomi3ina iaLak87Im0NEi6U/xHnJn7CmwNUipDiF9MKF/GtIjr1e1Gyt6m8pIY1kCp+5FPa328Syrw/Zb PbJA0zqGYQKxSOzfr3b3hf6hT9sVRI7TuNnTQ5N0jwVhjkbShE= X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-janitors@vger.kernel.org, LKML , Dan Streetman Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" From: Markus Elfring 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 --- 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);