Received: by 10.223.185.111 with SMTP id b44csp476018wrg; Fri, 9 Mar 2018 08:03:57 -0800 (PST) X-Google-Smtp-Source: AG47ELuhOmHw+PJbh7F1B37xtZ/Y8F7M1MpcJPx7LAJ5MKVg3CXG/nQ15L9YNZljRN4vWJjh+ujX X-Received: by 2002:a17:902:864b:: with SMTP id y11-v6mr28078533plt.380.1520611437456; Fri, 09 Mar 2018 08:03:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520611437; cv=none; d=google.com; s=arc-20160816; b=l/n05ktnf6DR6Grs122uITnKTjReXoHiM7fy81nx50UgMSJ54SBLpE9D3c/koX3b3f Uk00qQEIw9ZYgWyLYGj75s1c8Ks9dN/c5nUNkr81aMHt9PlaEYUE5QvjFEML7WFj2oRW WuVE5tPpQ0FcvvHm/j+h1IGhh7nfzdsbl/4UjgE5uQk3r2NeqwDCPNju73MWnZBZ1NBV nzJi0JHOXz7ll4iBNnSmhsbi5UVqhn1d14JWNOLOntdlRNamoS6Aj2T0Wx8JgF+gnrZQ XA68CoKLlGaLA9lFU8k1D+vw0S/GxccUqhcFhqxWVR53qBky8N9xO0njwRT5WqGx1VS5 Q3jg== 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=04gfEde1E+NwFTzdf3dQ44GPcrXjVrWLWQ/a9UftKks=; b=aEHgJlB4gX88Y7RqJ320IQ5p7U76w5BRzZmgVD1OSzHXGm9qjuYH8B1Egjdu/rFaUW 5Ub2Db4KfklaCrg6/NHBapg9LK3kQ6wTPo9XqqLpurd2c3UmZbIye6zr0h6Zmy4JUQyr Vf4NGOluyuvMlheZ1dhXCs0AFK9XhGLnveSkTKQwiVG+dnu/hDmVeYJLXOPdYcw/dN9N 9pI3D+/I+6NEcBLGpzFtgG6hqRAEZa9VlMWMS1JCifoGSYmrgjrJHU4sv+Y1lMuipe0q tGREbnQhiGgzuo2e9YjmWJz4DZP0eXzZSOpYHAgW3DiSXKXgzmoIVURWxrka4BrXaFfp 0q8g== 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 a2si1069356pfa.46.2018.03.09.08.03.42; Fri, 09 Mar 2018 08:03:57 -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 S932162AbeCIQB7 (ORCPT + 99 others); Fri, 9 Mar 2018 11:01:59 -0500 Received: from mout.web.de ([212.227.17.11]:40223 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751096AbeCIQB5 (ORCPT ); Fri, 9 Mar 2018 11:01:57 -0500 Received: from [192.168.1.2] ([92.228.30.253]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MddBI-1fJhTo0KGi-00PKgG; Fri, 09 Mar 2018 17:01:36 +0100 Subject: [PATCH v2 01/17 1/3] mfd: abx500-core: Delete an error message for a failed memory allocation in abx500_register_ops() From: SF Markus Elfring To: Linus Walleij , Lee Jones , linux-arm-kernel@lists.infradead.org Cc: LKML , kernel-janitors@vger.kernel.org References: <6c8ff539-9e9d-635b-22a8-df8100ac8156@users.sourceforge.net> Message-ID: <4948c6d9-af42-8c95-af38-fc448a8e25a2@users.sourceforge.net> Date: Fri, 9 Mar 2018 17:01:35 +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: <6c8ff539-9e9d-635b-22a8-df8100ac8156@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:W4NNCz8Tr4As0FnF297humGUJEH3ZiJ0oInQ58F6O9iXox1b+is PogWUL/1QTIjWglvCm4yx0Ucvw0RCGkmlq7JYY5rGjxPg0ZWhpPDa8Oa9Gpz6aAgeMFRKV1 TCDaLVhX9wUYc6LnqFz+lQDRz1FPoKXIAnUXwrXr3h3YatrYbBhJ1OMPhv+7YStgceGCO/1 o0k+TEljKLgurLyVSmiGQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:TPJwqtbaTO0=:T9pfSToeKzkZ9ve0Yt4oWQ Py/P7tG6MICkCgLiDJUYgMQvtY5a7pnyOtIKB24SWyWG0ujXNcERBn5+L6zQpPRBKwdeyLG2O jCngAJMM//6gDr/BuG5IAEqDVGEEmLFu13iP174QRlOmE+w26tw8f1ASCfu5ZXB2tT0LkMUmn P77EcoqxUMaQ9jmKxseczZpCz7rxUjgTcyAN1SGODHMATaoVQnKABi/SF4KFRKdrsSs2dAyHw EIQQcu5lmO+0w+eCY39pS32y4ds4q5V5sMFFZhhoQL3dmQlPdg1Tpn4g5qhw+UbfPNE4HtG5S FeH/f6eGzsxtHo+KQRAKNKDWKhSEyDDOOzwQ2+U/DcuPd9c41+SfzQCgESra2Pqt43N8BUgca da6ZSyXy7CyNrnqVmx1iQD+viIz9JrGyJHFx3ERZrnmSkBwx2nc0eWhn7GbiTPNqWLCBZgxPW Ultu8cu9GihkPNbztJAhTL2s2IXGitpMzz1OG5/UKoCDfWwNOu3aBmSlGoblN7eCF1GsJq64j jV6Ly/btxzVDH+SyApkr/guG7ihnjdi5PfM92oCQfZcUUjTOblv3F6uPn0D8CFTlc2JglNtH8 7IJQDa2Ol6UcxUhGL0gW80Wc9+rHaBoOFFVCqHRTo3s2CZbzjgBD2YVSs7uo1RzHDpFPI3C0v 5Tfl4Y7uTbnr0jRoJ837uNaIPGHO/iasNPnFT+s/onMQ2uC/JWe/8rd+4lQm5rvfdUKwKS38e 455KRF28bibmxbW+w0a9JcPfrhr1zPvABFYZX0s6pTuYk3JXplK2Y2364h7f+Dd2UzWcTsF2e IRpqCyF3TzpdbEQOY7atgpHaV2MGqwzmv8MayzaVA5XqLxEM60= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Markus Elfring Date: Thu, 8 Mar 2018 11:44:33 +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 Reviewed-by: Linus Walleij --- v2: Lee Jones requested a resend for this patch. The change was rebased on source files from Linux next-20180308. drivers/mfd/abx500-core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mfd/abx500-core.c b/drivers/mfd/abx500-core.c index 0d3846a4767c..c8c9d41abcaa 100644 --- a/drivers/mfd/abx500-core.c +++ b/drivers/mfd/abx500-core.c @@ -40,10 +40,9 @@ int abx500_register_ops(struct device *dev, struct abx500_ops *ops) dev_entry = devm_kzalloc(dev, sizeof(struct abx500_device_entry), GFP_KERNEL); - if (!dev_entry) { - dev_err(dev, "register_ops kzalloc failed"); + if (!dev_entry) return -ENOMEM; - } + dev_entry->dev = dev; memcpy(&dev_entry->ops, ops, sizeof(struct abx500_ops)); -- 2.16.2