Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755603AbdIHMbY (ORCPT ); Fri, 8 Sep 2017 08:31:24 -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 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-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 956 Lines: 28 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 --- 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); -- 2.14.1