From patchwork Mon May 22 06:13:37 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: 9739625 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 9FA346034C for ; Mon, 22 May 2017 06:14:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9104F286DB for ; Mon, 22 May 2017 06:14:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 84762286DD; Mon, 22 May 2017 06:14:09 +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=ham 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 3DC31286DB for ; Mon, 22 May 2017 06:14:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752117AbdEVGNy (ORCPT ); Mon, 22 May 2017 02:13:54 -0400 Received: from mout.web.de ([212.227.15.4]:56806 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751425AbdEVGNw (ORCPT ); Mon, 22 May 2017 02:13:52 -0400 Received: from [192.168.1.2] ([78.49.33.162]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LmLOE-1dlCKn3nFq-00Zz4v; Mon, 22 May 2017 08:13:40 +0200 Subject: [PATCH 1/2] ieee802154: ca8210: Delete an error message for a failed memory allocation in ca8210_probe() From: SF Markus Elfring To: linuxdev@cascoda.com, linux-wpan@vger.kernel.org, netdev@vger.kernel.org, Alexander Aring , Harry Morris , Stefan Schmidt Cc: LKML , kernel-janitors@vger.kernel.org References: <55fddbc7-28c4-8866-67d3-ff1ff1a4eeb7@users.sourceforge.net> Message-ID: <374015a3-15c9-f799-f26b-3aca91c77c55@users.sourceforge.net> Date: Mon, 22 May 2017 08:13:37 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <55fddbc7-28c4-8866-67d3-ff1ff1a4eeb7@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:BtpUgADKGT0N2WmVmYGQmmWv8qARavPDVvzDMfCXnt5CwNchPwL By2QxP/a5mjcs57II2hEo6BlHfwif3cume35j7Vws0+kHvCbZE6QT3V8SYAmdTglLF5Yb5L EYAAyqp9K/bWmlA1yF2iBNEnhjeTGB/iffSbfnk+zlwTJgmg0TBatp2rKfX11qWfR+j8aic 6Pu6L53N1STB1sp/jZimg== X-UI-Out-Filterresults: notjunk:1; V01:K0:kDcaZTWbERo=:YHYE9yJgCvwdFUYy2UiD9X jFkmZelPJ7uL+nGFrYEUPmpFbgqdpZgqEV/SCAM0Yr3RHPZzV83qsfDkEO7IrYm0uKy7sg/Di OKxHW1NDdagHmRjrHy/725icQuSO0nnmUV7RIp0F6FnewLSTlnW0oc2LIISv598TfI2o2uahE ToWN7AUiCO+Z2sWWe/SWpOHkizUaWQJ0RnuDwb3dkbMHKAE/uuMy9OITDjctILLiPAJ9T0g3k dlnzEpvUfmphQ88FFSx/13/zZpA5hB+prwqHzhC11zuditrEHFm3f8qtfmImnpCD8V6UcQAAJ KiWqCAQfY1xFQCb5s1YCuH2t+j3CPwM1BupD27o1Pi1S5CRpOFVDqtOBkCTScDHFmPhYFcAqm F/pFQeirw+ocjAmOqm6y3xCKdHfu3aDIb8nLm699CdYXQ1s/RDvP60PIGzCS+/GBbdygDgS35 BVJ+eh2VqbGXLE4ar2CZYiTHDDaVwmJ0OhS53DtLRpvLuf79lL44oumAjTaLZpgZfa0JIGKbx uGXC4E3B5xnoOkH8oQkuHEYA5yIKZShhECgEOaI3KVeHMyECXJUbTRxRyee526gRgj+GBEjS8 xqfgEEz8sxGRCVrZKC9n5pjXyI2t3DLLhkHC3gkxiljhDm7JouMJL31t/GFs6ANKUMjy30ch2 +yS+cZxV/BJmopZdmVVa+PG6nOoU0nGjUyDhlSRQr09GU2JsT9gFCwm0XxaEf+49dxFkIMv5a Hf8m41PL5un7bgUMW5tGcSIKxfYrmr0NaYIjeKNf1Do00UUYIuTzlPQhsVoRkRre+KFLZzFMB 8Jg3qz2 Sender: linux-wpan-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wpan@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Mon, 22 May 2017 07:32:46 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring --- drivers/net/ieee802154/ca8210.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/net/ieee802154/ca8210.c b/drivers/net/ieee802154/ca8210.c index 25fd3b04b3c0..25ed11bb5ed3 100644 --- a/drivers/net/ieee802154/ca8210.c +++ b/drivers/net/ieee802154/ca8210.c @@ -3143,10 +3143,6 @@ static int ca8210_probe(struct spi_device *spi_device) pdata = kmalloc(sizeof(*pdata), GFP_KERNEL); if (!pdata) { - dev_crit( - &spi_device->dev, - "Could not allocate platform data\n" - ); ret = -ENOMEM; goto error; }