Received: by 10.223.185.116 with SMTP id b49csp1493108wrg; Sun, 11 Feb 2018 13:27:27 -0800 (PST) X-Google-Smtp-Source: AH8x227aeRkKtpqj3Qlskr30R7ZzmVViWPmQ7e/gp+NOHutPm0vxCf/d0kJbt8abvpw506CceD7S X-Received: by 2002:a17:902:402:: with SMTP id 2-v6mr8691209ple.353.1518384447440; Sun, 11 Feb 2018 13:27:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518384447; cv=none; d=google.com; s=arc-20160816; b=oTmqgllVx/SGu5sWPB5LXL53D4uzdVT1yxhfCv56i9h2FwlpIMeSDC2slE8WXHaOUX QEkxoACceDpy2xZHnLh+WgDtuSfpv1ye2cwb0qV0QyMBcNwjKetCcOrBdoRr0lDZdCfO QrtStEVm824TFljtmLnc9dGX4IV/0jmhlcF1ciqy7pholisbnvIJLKZdZMRT2CymPbbJ zIINyeaBkxK2Q2x+rn0KFC2mlHPm1AN8Ukab0nv1JHzv/QrOAS86+LBSsEJaqG+hm+g2 xmCrL4iKVFOTE8x0iW4CNcGLer6p3jYV19RV+45huMgUJdoHegOEBgAJqTWQWBq6ODEI BH/g== 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:mime-version:user-agent:date:message-id:subject :from:cc:to:arc-authentication-results; bh=ZrdRL+R1fw9w3fCFJVV5saeZd+JsFMs98ZAhaiBjHWE=; b=s+uBVaKPF9t/mc+wpbuzjHLONB3sxRIdLfhZzS5rQFb3guMJOcWdVOmbg+unEB7w+v qO9h+IssFWNMIfoc11Q5X9ODvrTySsuMHKRfiY8lfXJvCQvPWms2PoADt6rFzooeCkiz 9dDY/x1SNugoFzWgz2B4WIEg4ujYOkTwI16GimmE6MtEQeFbgaPRfc/1vRKz8OXw2AKv 81X3xuOKjf6K4LoWj0Mbx5sn+nXFlBHN4QhuMj74UUFmhvfuS4PpSjn73O8WovIMBJAD dWqwQxSieHlg8qUayx3IfsVEoyHOw1rREFyGAdJPns1DyxbLwrmUKnKNpKRHKBSr0Efi k/yQ== 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 c4si1657005pfg.151.2018.02.11.13.27.13; Sun, 11 Feb 2018 13:27:27 -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 S1753777AbeBKV0e (ORCPT + 99 others); Sun, 11 Feb 2018 16:26:34 -0500 Received: from mout.web.de ([217.72.192.78]:41857 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753689AbeBKV0c (ORCPT ); Sun, 11 Feb 2018 16:26:32 -0500 Received: from [192.168.1.2] ([77.181.215.38]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MI63m-1eoqE645s6-003sXg; Sun, 11 Feb 2018 22:26:29 +0100 To: kernel-janitors@vger.kernel.org, Jean Delvare Cc: LKML From: SF Markus Elfring Subject: [PATCH] firmware-gsmi: Delete an error message for a failed memory allocation in gsmi_buf_alloc() Message-ID: <9cea2b6a-f260-a578-b3ed-6c118795907f@users.sourceforge.net> Date: Sun, 11 Feb 2018 22:26:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:ZSTYg+yD+xN4ciso9gp3S/aPpMxNp9RVB8JiSW84nZZLQvFE5K4 XMzrAvvheTufkkp5CyzAx+X1j79uU2BZV/FxwuUsp3HUVkQEVEJC0nc8bdcblkrT56BMKum gbibodp6P9OfbB1UMr1YJBnOiK/BWB1V86DLNdH5ws1mTQyzmAgH+2p5cUFERDQRw5w+Fsd qQUs8AdGWMfuykRCwk0wQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:tZq0Jnp8uoI=:+7dPQ+FN3sAlWLGVkKkkRv xybgQUvdkUvlyknMo0S0nOiY9UhK0X0hn/OC3dWKhArZCfVa2fR6EhPss//ynql8rK229229c FhoCJJZuszkSBMiItHTtdpzNQ4tcOEniJzu9FGvWmXO4M57CC46Pa+BGxz79jfcb6/qfZVYnH HPfBsRRWHflG1kYSlPlyYcnoBVXXQYQDhIPAXBQAfqEJAvMTuNsns9Dorpb8pE8JEb4jbS9vw e5Zyn8Fo1xhoneKcWiNT8RvL87uIIYdIoLPgEmd+wsVP9MeIggIhFt7zrlhMo4ocr7OWSBvGh x9Ur+z8zQbflhKUMQOyyxhzIFSViM856Dv10kyB1RX0b50E8b0XjUMq6Y0/IQDvUvvtrQ1OZS TlSSPafT98bsEP3FLSFzQcLz84HG8VJJslWpqHWhNozFBTuWjGXdkwS/aIRRNx8/ZXgw7FBbQ c0oRBS2eIW6TtLEdBwSV2FuK3F8a0zV0OYlEs3dwiiw/E36bBql+V0AsvHqAxDcbRX1KZ9h+R NJhYKnrDBu0vQK+WJ26yeqo+PWXfCWYFIAv62NZZg82awbF+c0F9AVM9/IVn10a0PECEupV8D ZE4JeXFQmkBBHu3uD8lRwlU23nCNG/s+LgKspNHl4CQl6iSc7hNb50brHR839bVYghpkq7Zen RS4k7HckxsiFnO+zi3cGwQ+76LK4E99bnYBDTbckkngNWuRYUaYfDbrLpv/ZWQ1XkwY2TOphb gvgdlGAU/rUKPlNRUWt1gCo5kun8mwdHtiAh8bwQW9wUSCotVXRwtDAQ9X1pBHxpZxAaCTLKK cgmVFzK3sbAXL0owHpwZ6RZ/wIvW/M7onpkK9MMCuwf7WMswGQ= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Markus Elfring Date: Sun, 11 Feb 2018 22:22:02 +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/firmware/google/gsmi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/firmware/google/gsmi.c b/drivers/firmware/google/gsmi.c index c8f169bf2e27..fbf661e0b784 100644 --- a/drivers/firmware/google/gsmi.c +++ b/drivers/firmware/google/gsmi.c @@ -138,10 +138,8 @@ static struct gsmi_buf *gsmi_buf_alloc(void) struct gsmi_buf *smibuf; smibuf = kzalloc(sizeof(*smibuf), GFP_KERNEL); - if (!smibuf) { - printk(KERN_ERR "gsmi: out of memory\n"); + if (!smibuf) return NULL; - } /* allocate buffer in 32bit address space */ smibuf->start = dma_pool_alloc(gsmi_dev.dma_pool, GFP_KERNEL, -- 2.16.1