From patchwork Sun Nov 26 17:43:17 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: 10075475 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 3F7AC602BD for ; Sun, 26 Nov 2017 17:43:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2BC6C289F8 for ; Sun, 26 Nov 2017 17:43:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1FFDC289F5; Sun, 26 Nov 2017 17:43:54 +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 C3BE4289F5 for ; Sun, 26 Nov 2017 17:43:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751318AbdKZRnw (ORCPT ); Sun, 26 Nov 2017 12:43:52 -0500 Received: from mout.web.de ([212.227.15.3]:56149 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751046AbdKZRnu (ORCPT ); Sun, 26 Nov 2017 12:43:50 -0500 Received: from [192.168.1.3] ([78.49.168.181]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Lo0YS-1elRxq3lSi-00fx0Y; Sun, 26 Nov 2017 18:43:39 +0100 Subject: [PATCH 3/3] video: omap: Delete an error message for a failed memory allocation in mipid_spi_probe() From: SF Markus Elfring To: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Bartlomiej Zolnierkiewicz , Tomi Valkeinen Cc: LKML , kernel-janitors@vger.kernel.org References: <1e17c727-884d-5745-2726-48dd3a53c32f@users.sourceforge.net> Message-ID: <62f8d5bb-64cd-487f-6ef4-e3aa7a8b5fd5@users.sourceforge.net> Date: Sun, 26 Nov 2017 18:43:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <1e17c727-884d-5745-2726-48dd3a53c32f@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:e4vrOfYuZJdHufUonaE8fYAr1/lC7Zwjzsan+6h3GCh0dA+qZqL pEaEwumjTv0a0k3k3+BC9G2Jbuo3LugTFErSy13FS1K3ZwIrN0L0CufQAXQplGnk3w/A1tg uxZ0cOPL2bwdHZcbu67ujf4N0hTdsNDc6rMCTuxUxxmWT1Dnip1wE20S9tENcMLLQMYgdyj 0YClES7KhpWaIQbc59udw== X-UI-Out-Filterresults: notjunk:1; V01:K0:+9rYzxGoaUs=:aE/MWxDe7bPv8oROtUNd/b 8ucTM+GN6IYQiS5Vw328qip7LKke1uOC31RRNGNNeTFiTJZiOQNSLYyvt44YiXyZeOTa8W7n3 IVeMIjKWeyMNeHjf8/mW7Izf/sFzsH4sdvMcg1PXCIPzHcsmBvZdIvjVUK+ty7RnMMF30Yc76 SRDKhrcO5ZcYZ6JVcdn2kIqCsAlaNPreWVF8HIMmv5vc/rri5iiOE9hMkFrKZMBf1qVGb7ZTy fS1YEkcj2chCOXvyzeWE2I8fSDdsHIzGXVVxc6e5iqx1or7j4c5mcYUne/hBbX+az0T1IzXJe +DBtlZyoG5fGGI2lyGniCWfXzuOxk66E4a8LLZf4U8XFC2gcizxc8KWe80PccavErJzOZyU7p CjbwmlzQqNwlvnr0V+1E+gdVV42AnDDovErjrKVABYU3KZt6z8wR9qJOSnX3xIvYCHhm2I3EK 34l5XyyUJBEfMIntEgieDZjgVdX00SRGikvLtyJnMTtn6vqr8Ia52hGYV7LWnm9bHxri/HDt2 belEx1CvU2byk6IL5glL1ZUtUN7F3zCneMFOzAXga0KDb97svfjpHNX5z/2JYsGsB2G9DN57a GrL9UbTjhqb1R2k0Xssz6sIWNryKVbuSO8IiAfNucKzLzsLFhFcp/3aFOyu5q41JO+lsdHOlx 5tVlPXLa7cPzJsfwnXQkZdsoPW+g7xUr63kM6Y3vY3AX0ZoZj6QtKt6uCmUmkZftyWQlSWhex QZq+lV2lRF7w06f9BrnwWLeM45hhGoUJmCS+OMBDhN9p/tNkvDfsnBgSwZfHMIxw8sQ4MB9qb FtG93NP8TkxXmqKb9DfY9S0sCdnWiSCTIseU5bocMoRG9d6CbM= Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Sun, 26 Nov 2017 18:21:25 +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/video/fbdev/omap/lcd_mipid.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/video/fbdev/omap/lcd_mipid.c b/drivers/video/fbdev/omap/lcd_mipid.c index e3a85432f926..e71b674b47d8 100644 --- a/drivers/video/fbdev/omap/lcd_mipid.c +++ b/drivers/video/fbdev/omap/lcd_mipid.c @@ -564,10 +564,8 @@ static int mipid_spi_probe(struct spi_device *spi) int r; md = kzalloc(sizeof(*md), GFP_KERNEL); - if (md == NULL) { - dev_err(&spi->dev, "out of memory\n"); + if (!md) return -ENOMEM; - } spi->mode = SPI_MODE_0; md->spi = spi;