Received: by 10.223.185.116 with SMTP id b49csp690387wrg; Wed, 14 Feb 2018 05:36:17 -0800 (PST) X-Google-Smtp-Source: AH8x224K03MhIH+r0nozfyXiGYu7bduZJq4obHB76/tFD++6vPQa+/tJyaPe28xDvoEeskhsjrwS X-Received: by 2002:a17:902:14b:: with SMTP id 69-v6mr4596471plb.209.1518615377794; Wed, 14 Feb 2018 05:36:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518615377; cv=none; d=google.com; s=arc-20160816; b=yz3my7d7XtFGzqz6kNwP8aa/sQ+yEFfKpOKJ2fs1hKk8Peya9lZlq62IBfzm+WqrSl 1Dxtl9oQwJN00WHzTgoO6kTq5YCsAgeF4AKlk6aX61y3XRHoTrdbCCOC8ynuJawUukyN 0pdyfWtGE1Td0sJ/jewkbj2PPf4av5aml0zyDCaE6YZlj0RoDCeyBYDCDPqRzhnKi8b4 2uCr4ZvM7/pWJ669Si0fOC9cpUbOTbuZIxnjYCPqnC2Qv/lEmG5tbxDlwk0C5oT+z/WX N/LecRQ3TEtLmfIkF9BaczHuG/+Vic5Lfy46SC3omR7ewvTfxyQ5epc4L3oyxygX8TTd 6rzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:arc-authentication-results; bh=nPtg6UKhKVZ5lgAm6802a9EJLrkJpdWPuoFRbYc0DyU=; b=V7epVX8OSj3/okZhyX2Tt1suK4hoRCkcByYRaU/C2lUqh2+wpenxyO7N3bVZxD+h/X kKepPxS74DTE/PL0z/G5SOUKm++wbKudODuJs3IrXF7UCawaxdyb/dxlVv24s0wzWrwj ms6yX9SKnjSU+WaVmABDBvE/LtmZHBtBcVThLx9BwjuPLVmAIh064prV5xUUBpvzR0Hh a/ChdxFnsq+xDb44Uk3nxaJ2sTmpHpEs7988VZaR9KfdMBeJwRwUZn6609Ys8BCXaPnp myd29HO08u9Wwq6QADrQvY26fxff5bIecBBgw7A0xJK46ueLl1cjfX6af8l4r0p7Pjdq ThAw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o86si6779307pfi.370.2018.02.14.05.36.02; Wed, 14 Feb 2018 05:36:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030350AbeBNNeE (ORCPT + 99 others); Wed, 14 Feb 2018 08:34:04 -0500 Received: from mout.web.de ([212.227.15.3]:52435 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030236AbeBNNeD (ORCPT ); Wed, 14 Feb 2018 08:34:03 -0500 Received: from [192.168.1.2] ([78.48.82.239]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0M6mQO-1eXqaq2v8G-00wT66; Wed, 14 Feb 2018 14:33:52 +0100 Subject: [PATCH 1/2] crypto: sahara: Delete an error message for a failed memory allocation in sahara_probe() From: SF Markus Elfring To: linux-crypto@vger.kernel.org, "David S. Miller" , Herbert Xu Cc: LKML , kernel-janitors@vger.kernel.org References: <6a487cd1-c05c-3d5d-ec6b-a6a2ae376f05@users.sourceforge.net> Message-ID: <0d8aa357-223d-56e2-1cbb-8113290ea1cf@users.sourceforge.net> Date: Wed, 14 Feb 2018 14:33:50 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <6a487cd1-c05c-3d5d-ec6b-a6a2ae376f05@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:XZH9LjwsdXQSmVS44hFA5MRUQG0NgqFSpqn188qTOSNv/jW/1rV jvqbD2xGohfkKf8scZEd0DQlgRjlK8JHkQLz3fqjkZCEq7NV31cPwWVAva+3O5XbdGumm4w ClRQ6iKB8xuYwFUO0KsTta5z/mNQMyzNnY1T99XCCo2idHeX6vWb7klNpBHyn6vxH5wz9uH M9BhA12reHPBkP827rPbg== X-UI-Out-Filterresults: notjunk:1;V01:K0:rzOYtdebYaA=:Sx6Xn1vtx1/XxxbD3lN90U Y0ODFaiwM3DFsAq7Ytk7MMrG2jDf8+kori2825iQ0lyb0jXEJFQemJCNLgq8+hGKOH/LPzHUJ tJn3keIrkTEIGpqLswH7ypBn1ksobxreRKkyXW3xuRik5lxXtZ37wtpgLwF7RqmIuS8l5vNdN FzIp7svEwVeIe+azLfDOyFtT+4GOJI3lTlMdlIDXehhdFv8xBmpeI96Gk5QzARPtTjYF8vSel xMQuXPSdfWq4iwzluCi0UrEuJmMu76Q2zQKZSja/6LmhvTY3rcxlxju63njMftVIhyVfXLg+W o0fwxZp0laWVT4MF2tveVP66whbdqYsNNeWF4aYZDUUEgOWbWts1CLTceT3lIKfLxfURBL0Pm Mg7N9mtm1XT/6NH2eNXQyIZMJjH9yl6n1r3yfcuv/oYexFYaThl/uVpv3qMcr6zh/N+som74L mbx/0mvVZLA7f55YTQPAgN6FwOEg5RFCCA74mJE+m8FjW1LTD5YbfXoa/VP1if5TFPUnZH+gu 8h9YVV4UxT8zS6P4PCDT9gr1iKGyHXzwKnlVdPzrKlcwdib6A44+WIHByiZIP/J4CtXy3Qc2G Btr+donK6XoM6qEiLsW90fW9UK1aaJPkGDA42NS6aiPFy6Ni0SROUM/LgPOyUIld20KHYmChY qhEz+OC7In3RtunExT/Nhkvnk6n2z72Zrqx5Vu79eO+m/4yQ+HdOfSP8qbMKxHXGnJ2dFTXq4 //Iv6Qv4scYR4hflYIVu7WFXp5k9yUd2lCjJCnc/eWQ1JqukseYbIEJI7JRRlTPsXWl5/UWpT 0f8ef5yTNwuCnLYaAGTEzkxEyZJXNyWFeyDMSKXBcLDayXt6Mw= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Markus Elfring Date: Wed, 14 Feb 2018 14:10:03 +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/sahara.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c index 08e7bdcaa6e3..9f3cdda59139 100644 --- a/drivers/crypto/sahara.c +++ b/drivers/crypto/sahara.c @@ -1398,10 +1398,8 @@ static int sahara_probe(struct platform_device *pdev) int i; dev = devm_kzalloc(&pdev->dev, sizeof(struct sahara_dev), GFP_KERNEL); - if (dev == NULL) { - dev_err(&pdev->dev, "unable to alloc data struct.\n"); + if (!dev) return -ENOMEM; - } dev->device = &pdev->dev; platform_set_drvdata(pdev, dev); -- 2.16.1