Received: by 10.223.185.116 with SMTP id b49csp527590wrg; Sat, 10 Feb 2018 12:33:41 -0800 (PST) X-Google-Smtp-Source: AH8x226o9bKRbqajy9mDRYNoo+Abopgnp8bTwxqE5oOUFvHV/Nn9a2qVnvxjLttN7kTQ21msiWcl X-Received: by 2002:a17:902:8ec4:: with SMTP id x4-v6mr6169980plo.271.1518294821204; Sat, 10 Feb 2018 12:33:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518294821; cv=none; d=google.com; s=arc-20160816; b=VuqVNl0/UcXz07m5Zyezcqr5J/5OqtYl6KYhf7mum5p2BnlZFz+5xTpSEfDKaWP+cx zKxhcT8D8z1TzdYUz25wxtltKxK6SPD822ePpCr6EhTCj4QGKs97Zb7AOxtOUa4qRpHU 42ItrZ1+VLh5V6XFkbiSw0B5Kr6zqtCCVmlpBAtMQJQo+kbWwIMx39yffw9j3lUGdwP5 M7aoRpv+mLuLHt989mGl5j2KNfmOaz8th846ZRQDkqt9viCeSzI2HJJm3UH/H2LmuXHi SeQxCfzSWwCoQv0i7Q5uxFFPEKhhUpcHel8aXL1OJ9ZNaQCruc9h8jCzadRf2Lf3e5P4 y59g== 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=kHqoGiYZ7rfWPE5WS/o3O+z1ULtOBxsXoKAcSSjWP1w=; b=wwqEz3DSMLVfi3wYa7/h5Gq5EbFamEBBnJUrg7is1InP1PafwKvSYox9fBk4G9IiUW xfAVF9Jc203SwXhbBztodgqM/+e8gwR5HP0wespudRM+OePQ3G3d981WWB4Hd84ZOrrz IQesh1kA11P2x9zhcskD/eTQXoF3pYhq539LDB6gDtEhSqgb94W1GB9bvVWxi9IZzrl7 Dy9HszXwcgxsotmhsOAt4qxszRUvpfDtXPurK4Q1PxkMk3RSAJh1GQM03Zt/JDTeAtTN rCBnIcn/ddZbkd8t8mRWSV0qZpMpK4cjcqO1vGzN4bz+CIm8zGDc2nQts4KJV1zdcudc 7d4A== 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 f12si3086077pgt.140.2018.02.10.12.33.26; Sat, 10 Feb 2018 12:33:41 -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 S1752406AbeBJUck (ORCPT + 99 others); Sat, 10 Feb 2018 15:32:40 -0500 Received: from mout.web.de ([212.227.15.4]:46279 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752314AbeBJUcj (ORCPT ); Sat, 10 Feb 2018 15:32:39 -0500 Received: from [192.168.1.2] ([78.53.150.195]) by smtp.web.de (mrweb001 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LZvw5-1f7bpZ3KIP-00li86; Sat, 10 Feb 2018 21:32:37 +0100 Subject: [PATCH 1/2] gpio: timberdale: Delete an error message for a failed memory allocation in timbgpio_probe() From: SF Markus Elfring To: linux-gpio@vger.kernel.org, Linus Walleij Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: <758bf4e7-5beb-dbf6-54ed-6c691a56bbee@users.sourceforge.net> Date: Sat, 10 Feb 2018 21:32: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: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:J32BJOGAxpdrsF8bdm+zr3uXFb3szUQRUF9NukBoc8smELBLHB0 c5u0kYvh7LlAw6L2UcDim1ajstwa56xl2/EtwDuZ3m6Mf35AkcU9B5MROU8XmFfBJyabGzG 2u3LqFqtjI1U8OTNR2scWsLeSFgJKsu8yyRue3c3as4K68IuxgakAMgb4dofedeflxo9wCw ssuHlZHiVHoRB90+mpk/A== X-UI-Out-Filterresults: notjunk:1;V01:K0:ShSGQ1+Kuno=:4HDu+hfK7HI2uSH5h6WaP8 PH6gqI6YdgUz+vgF9vUO00voRSbYVkrVt9g6jQpDu0vUrL4zveTldD4bQRKsGCpNp6zeyGYJA +nAJQ4Vt9QvbkIetdf8AhNml0tPSJolAA3dWoD0OcaidQLqmR6z63zoRgSIuXsx9LK46S0whA HfYJ/ti2VJH1zGmpevjzMqYrpovLniDlVb0isNNxdPjN6LeBwi/kgvP+e2nYSkaEBjSrWzWoW kmYj7sCjkN3hnKhhUAzx+bCHVYLtFrRfw8qhFbIMniLRbGTFLPcrt2NdWdSNc4CYruNMCuPSh 94KTWYXKO83wGjo5zaZFwtpkxd7OO/JuQVZlDxvShEtWMhH29FEHaDSJBMXyOHzySGL7LlsHL ZrduWEvoHT5TiNxdEX5DwrUALTct6MdDrDKWm0S4wsQhrBiiOeO6T3N53p7JZ3VmrYpDr6CfZ L6Pp28v77zxIyOmuB4nS94nIuE6ZIvb+2H0TgLFm/HcJXuK0CvHvReKjc+wE0lEHeVCRMw0hX t47SRQfma9ni0sUUgYhF8yu6ws2aKiDcwm+jb/nwBte6myGAJeQVLnz9wcNjUw7Aw0yn28QNF 1+jWQKwmNmAdFXUmeHyhu9oX6sDKk8uXXmpRy/4AGzAUrHOY6ndLtveb7sufTrtt24XmqkuFZ EW1lpSl0jW2Pve4OoSOYxBY+QMZDlDN4lL64iRk4iJxbrk4aln0x5YfCtxHAr7O/kV6gM07tt hknX5qTNIdvrZXFmW1U7NC9pf8LKYWzf8A7fWqK0eRXsHMo2KNWY9J42zPPV2GtoG7zt8dbiL o86j6VgrcCHKCIVFYt3O/neMm7ExgNtOVfDgBaxOJz1kBtvo6c= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Markus Elfring Date: Sat, 10 Feb 2018 21:09:08 +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/gpio/gpio-timberdale.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/gpio-timberdale.c b/drivers/gpio/gpio-timberdale.c index 181f86ce00cd..ff155e437210 100644 --- a/drivers/gpio/gpio-timberdale.c +++ b/drivers/gpio/gpio-timberdale.c @@ -239,10 +239,9 @@ static int timbgpio_probe(struct platform_device *pdev) } tgpio = devm_kzalloc(dev, sizeof(struct timbgpio), GFP_KERNEL); - if (!tgpio) { - dev_err(dev, "Memory alloc failed\n"); + if (!tgpio) return -EINVAL; - } + tgpio->irq_base = pdata->irq_base; spin_lock_init(&tgpio->lock); -- 2.16.1