From patchwork Fri Sep 8 12:31:05 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: 9943843 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 11B4D6034B for ; Fri, 8 Sep 2017 12:31:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 04488286BE for ; Fri, 8 Sep 2017 12:31:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED73D286CB; Fri, 8 Sep 2017 12:31:36 +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 AB07A286BE for ; Fri, 8 Sep 2017 12:31:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755168AbdIHMbX (ORCPT ); Fri, 8 Sep 2017 08:31:23 -0400 Received: from mout.web.de ([212.227.17.12]:56917 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754560AbdIHMbV (ORCPT ); Fri, 8 Sep 2017 08:31:21 -0400 Received: from [192.168.1.2] ([92.228.166.205]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MFLB2-1deFDl0SiS-00EODP; Fri, 08 Sep 2017 14:31:17 +0200 Subject: [PATCH 1/3] [media] DaVinci-VPBE-Display: Delete an error message for a failed memory allocation in init_vpbe_layer() From: SF Markus Elfring To: linux-media@vger.kernel.org, Mauro Carvalho Chehab , Prabhakar Lad Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: <9be97d7f-57bc-1c7e-fd86-187a38e0f994@users.sourceforge.net> Date: Fri, 8 Sep 2017 14:31:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB X-Provags-ID: V03:K0:zFeybR3JcqrRxa33KGY7lpSKSl+GvvmJSeqpMpADBivX6iABOoL rUmtTMxNAbGWy0gRyvIUuXF+q+Vz2XfRQHA+IEIquWqk1zNrofXltfG31ZVRbJs7HDOEywU zzvXGF8HmVMAjmug9+wjWL++9KiOHqDnz8iR7MimO94pctUjnaAzvSf2v6gmYJ9+SNuHgjB KscLHSoQXkrJV6jL4ldtQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:VaqXkQVxbno=:/+N1M3cSWzq9sY4sHizzUI O44q0BO1OYBZVZ5gwmmJBP8JuioVsWGeD/sltFEMr5me2B78QC9ij98grHxIbikRt8FOXP/WI p3/Bgg9QEbJCgeh4gv/eA8x9fOaLk8aEJe5h5Rx2u311WjpC+3++TEXNGHo/I6ksVmR8g3ZV2 QH7TqX1P+ujSv4Zs1t7eGdmgvtZovDGb5KxUVw2hbo2wN4bfOG1WG6o2ZUuiSMNkG2OVfoU1v ztQt+B/8M3LlcEfEiSxKybbLvwctUgpKp5fE25XXOUGdTdztaxLAwhVBpxN4UraDKYMe1G4z9 e9CY63n008HAxI6p5PFckHWsH6VWw1vlOYMbTIKvbMz1a3wZUDJEbctwEz99ALAFv4pVIjsvX i4spVS2pte4DyKMYzElDqo3hCmxPMFUz6AFLuSCahN4mbvA2Na6zLampa2bVDfL5XfUOtgmIw 5qFfUeXnVMq3M2vG7HX+b9dzvfPKbN0uq2AKFh59Uw4T8Jrg9I1bCLbjYp+PPZSl0gB1hIftm 76A2P03sALfORhxket1RVV8CNgxKvt55JB1Bk4iUuubaWysd2b0Z8DnkyHWip06zWsCwp0oGX prbjYra19C1CvX2NRLwsf78eTJC6UAntWl0FRxmXl+7KhSqYAhcSNMTEfjEssTNWiu/DPjb31 FWSmm6jtK1GL9YIzSpzXpjB3JG4IjrtjbwstL1oWnGLdLctpekDvNtOCEGVfMpX8OnWYy6kQ2 vTI+R1nnrl4HVsgBIOD44EbHScYU3VDOUoQP7u/O/dJMttucipnmIvDH+3+lqr4E5fJoQJB89 n+J2MZAhhqYAQmEg57o3uJ2KXwGTR2DmXAWE8vE6vAQtZMMQHE= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Thu, 7 Sep 2017 22:37:16 +0200 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 Acked-by: Lad, Prabhakar --- drivers/media/platform/davinci/vpbe_display.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c index 13d027031ff0..5b6fc550736b 100644 --- a/drivers/media/platform/davinci/vpbe_display.c +++ b/drivers/media/platform/davinci/vpbe_display.c @@ -1313,7 +1313,6 @@ static int init_vpbe_layer(int i, struct vpbe_display *disp_dev, - if (!disp_dev->dev[i]) { - printk(KERN_ERR "ran out of memory\n"); + if (!disp_dev->dev[i]) return -ENOMEM; - } + spin_lock_init(&disp_dev->dev[i]->irqlock); mutex_init(&disp_dev->dev[i]->opslock);