From patchwork Fri Dec 29 20:52:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 10137389 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 97A5360212 for ; Fri, 29 Dec 2017 20:52:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8BDE62D80B for ; Fri, 29 Dec 2017 20:52:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F8CF2D8A9; Fri, 29 Dec 2017 20:52:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D2922D80B for ; Fri, 29 Dec 2017 20:52:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751827AbdL2UwZ (ORCPT ); Fri, 29 Dec 2017 15:52:25 -0500 Received: from mout.web.de ([212.227.15.3]:49590 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751432AbdL2UwX (ORCPT ); Fri, 29 Dec 2017 15:52:23 -0500 Received: from [192.168.1.3] ([92.227.72.214]) by smtp.web.de (mrweb001 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MJCAc-1eWfGd3sPy-002nV3; Fri, 29 Dec 2017 21:52:18 +0100 To: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Kalle Valo , Solomon Peachy Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] cw1200: Delete an error message for a failed memory allocation in three functions Message-ID: Date: Fri, 29 Dec 2017 21:52:15 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 Content-Language: en-GB X-Provags-ID: V03:K0:P+5hCX6T3/enc/rcHau8rD/Bd4fzFGhGUx+ehpF5qJhn3Pu9n+b 4BlNbH2xTNDABW0Y5KXkEYCbgAmVQUABEzSOwdVjb42x9bUAFhuM32kihGWpFqKyCkS4403 JlPDsfavc0l/OxWy/P5bQB/2KBaxhsYyZMLUb4YbsEf3VBDrIT+3pJi4Xf/Cl8rrf7JffS5 plbphg/4GYx37zMlL5Emw== X-UI-Out-Filterresults: notjunk:1; V01:K0:mhxwRnrtbOc=:MSIBJ13ANmylMk1BgAwZ/L TPntcwu+M1lpcUM6T7M4qrT9y6M6+kJjKwhshhTVrsHp/MHHeojcr1GPtQdALVy3WVZleXMRo tgqwmy3ssAxIuy8a07vfMx68G7CLwQTOzlSK73dZfoXAnb3KfPhz8PwpjOdProUn+8QwrF/I6 l+YBj90ZuFiQ1O8GhWmKvC5/dz/vQFdmv9ywvqSjrOJG9U0LFvsMR17vXhAdCpUB6ESmxL0h4 tr71wymHzB0fVe6ms5I1DsLdX+C1R/UJkXncvc3yERWaiJbkLnde8uq3BC9Oz7gaNDTdR5DGf 4PcNhAiwjSNR53NOAtxyBtyIg+vpcQ4dJ/fjTLBSqeWNw2gyWVF3aedMglyHdl4cGDo8nGfzv NnrVEwUvYeNUAmjnk3neqDnS4ZNCCcWmN5sBtEPiSdSQorRrDeNu4BRCBv6PD5Hae61Me9lax f5r5CWbSQ94JEc0EDcD7SWEHBbk/FtHNFnB/b71HeurUSyvu5Lj+Hprec6aNpsz06WKjPc/cl Ly8T5EsyJm3KyfiOajqOUJ61zt3pVrJb9N8lsl5TJ83+uFoKJTaR44CNEVv09Ar2Gk+wTRf4M S5jNA3Uf45FKN6ibY3ZMyG8OZqhjPj5JAyWr7SWP0XvHoDtrWp3kBnRH4UxHmSp9rx5QOAtlK e+P5gABTcLllgoIXYLkqxW+Xx/91SUnOX9C/DICAEjgEJ1xRLVOe3FgaFhWUCvoX58H8uXuiL YXslpEJEt0farggW0HjkQF3OUkB0DmeVZx+B1/wRqEGOYnbFmUQJSXIL186FeUcUC3MZ0r7pk a37plHvKXxF0Q0M8G7QsP9Sv9NRMEvBAfQ2SdPleIcV1der3vk= Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Fri, 29 Dec 2017 21:48:05 +0100 Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net/wireless/st/cw1200/cw1200_sdio.c | 4 +--- drivers/net/wireless/st/cw1200/cw1200_spi.c | 4 +--- drivers/net/wireless/st/cw1200/fwio.c | 1 - 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/st/cw1200/cw1200_sdio.c b/drivers/net/wireless/st/cw1200/cw1200_sdio.c index 1037ec62659d..82c6827579a9 100644 --- a/drivers/net/wireless/st/cw1200/cw1200_sdio.c +++ b/drivers/net/wireless/st/cw1200/cw1200_sdio.c @@ -289,10 +289,8 @@ static int cw1200_sdio_probe(struct sdio_func *func, return -ENODEV; self = kzalloc(sizeof(*self), GFP_KERNEL); - if (!self) { - pr_err("Can't allocate SDIO hwbus_priv.\n"); + if (!self) return -ENOMEM; - } func->card->quirks |= MMC_QUIRK_LENIENT_FN0; diff --git a/drivers/net/wireless/st/cw1200/cw1200_spi.c b/drivers/net/wireless/st/cw1200/cw1200_spi.c index 412fb6e49aed..7b6d5e5c5a62 100644 --- a/drivers/net/wireless/st/cw1200/cw1200_spi.c +++ b/drivers/net/wireless/st/cw1200/cw1200_spi.c @@ -399,10 +399,8 @@ static int cw1200_spi_probe(struct spi_device *func) } self = devm_kzalloc(&func->dev, sizeof(*self), GFP_KERNEL); - if (!self) { - pr_err("Can't allocate SPI hwbus_priv."); + if (!self) return -ENOMEM; - } self->pdata = plat_data; self->func = func; diff --git a/drivers/net/wireless/st/cw1200/fwio.c b/drivers/net/wireless/st/cw1200/fwio.c index 30e7646d04af..79dd7a8ffb05 100644 --- a/drivers/net/wireless/st/cw1200/fwio.c +++ b/drivers/net/wireless/st/cw1200/fwio.c @@ -153,7 +153,6 @@ static int cw1200_load_firmware_cw1200(struct cw1200_common *priv) buf = kmalloc(DOWNLOAD_BLOCK_SIZE, GFP_KERNEL | GFP_DMA); if (!buf) { - pr_err("Can't allocate firmware load buffer.\n"); ret = -ENOMEM; goto firmware_release; }