From patchwork Wed May 17 11:54:29 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: 9730935 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 89321602B4 for ; Wed, 17 May 2017 11:54:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 794DC2874E for ; Wed, 17 May 2017 11:54:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6DAFE28767; Wed, 17 May 2017 11:54:38 +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 DE4F22874E for ; Wed, 17 May 2017 11:54:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753759AbdEQLyh (ORCPT ); Wed, 17 May 2017 07:54:37 -0400 Received: from mout.web.de ([212.227.15.4]:57942 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751680AbdEQLyg (ORCPT ); Wed, 17 May 2017 07:54:36 -0400 Received: from [192.168.1.3] ([78.48.117.83]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0M6gdA-1dwRsY1yj6-00wWRQ; Wed, 17 May 2017 13:54:30 +0200 Subject: [PATCH 1/2] spi-bfin5xx: Delete an error message for a failed memory allocation in bfin_spi_setup() From: SF Markus Elfring To: linux-spi@vger.kernel.org, Mark Brown Cc: LKML , kernel-janitors@vger.kernel.org, Wolfram Sang References: Message-ID: Date: Wed, 17 May 2017 13:54:29 +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: Content-Language: en-US X-Provags-ID: V03:K0:rBHBugQIW1K8AIkF8fxbgZaaSyig6vDol1XAKbxppYGUBOYdsqH mnfLvO4kXnJjmK2kBveAfWJRqkjnrRWhwt15jp7agqdW6GkuScsl2NY0JEqHhfcSLhTEw7X Xsh3N4PUfw6JPPmrysOzihEjvhBjreOS32Xc87Y6xrqjeDdeO7wqHg6upuejeDyj1CCH5nO xSehfGNDVmCxKFv9yikOg== X-UI-Out-Filterresults: notjunk:1; V01:K0:Z4diOHF+60o=:gOO6v/MCZ2F7ix5KS8og+m XFCODGlGv03d3GcPIKYbOu5mtmTv7i/haj/kO7TTGnoSH/8EC3gLpCW5aZM2EfbelpHMujzBR vki8MeeNpOQJvOxmDb0YaG0fRWw4A+8q93wLazbdI2yr5Go/ytgNXAu+40FQQQoBC6O1t4uuL Koi7Wv2bL2NsAIrC2yqWvLhMVb1R+k4r/G7zq5RO8yYkiDIltX+/319QKlK7eaXpVsna4pARn rAjzya25bNN2yWeTUh3kcOQzaFeyn39bA9TzwiRIXH6Ug1KocHgp7kOHDZawh+wY3Co8FFYY6 JWZafGWhFZZIaxtJR3YsOnr/qWiQN2ft+hg/D76IL61y1ol60uRfyki9Ax4LlH7CGES8wPFL/ 1txQCcPmg4t1ZLjGXWuUpB+kjRJU8Ic4nNSRPTvApPLrR4Nd8S5dwdE2EwemtnyGL4eOPX0qc JRVowVP85h007joYGnSUcsWYwVlRAZpeLGtRU0FyK5TxBiVZ9uJUDGbIhcQpF4giSsRpWusQX xwiXqy9UvXj3IfHOYKTSGM+FVbn62rHDsjD4nNIzoUZPU6WZFph8Gjf0bmc7ndrxSQ12U36cj HvCyiYpIWIZ9kvoZOptxWsU9N2QPdFWL2xX9XZGUe8KnWeoGgRA8Khx6rQQ9Zzt6CGzEDYGTL rkimy6B0A1TBGU4HEtkYA5ALFxjjWMSx+EWsGS/MwqKoA0DJ/Uz/mXMosOCwV00Qcd9LbCVGT cNmr3R2pfUdjY33KlBxqNOu1/6uhGNIDXH5kCjXJdbSQFXImmc0+cGQ6LVh2qx1RNxaPqgh3/ Y5zcQ9u Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Wed, 17 May 2017 13:00:34 +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/spi/spi-bfin5xx.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/spi/spi-bfin5xx.c b/drivers/spi/spi-bfin5xx.c index 249c7a3677c9..3265f4967d2b 100644 --- a/drivers/spi/spi-bfin5xx.c +++ b/drivers/spi/spi-bfin5xx.c @@ -983,6 +983,5 @@ static int bfin_spi_setup(struct spi_device *spi) chip = kzalloc(sizeof(*chip), GFP_KERNEL); if (!chip) { - dev_err(&spi->dev, "cannot allocate chip data\n"); ret = -ENOMEM; goto error; }