From patchwork Sat Sep 2 13:08:49 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: 9935547 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 79F17603F3 for ; Sat, 2 Sep 2017 13:10:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CBB728592 for ; Sat, 2 Sep 2017 13:10:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 60DDE2862B; Sat, 2 Sep 2017 13:10:15 +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 EF18828619 for ; Sat, 2 Sep 2017 13:10:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752649AbdIBNI5 (ORCPT ); Sat, 2 Sep 2017 09:08:57 -0400 Received: from mout.web.de ([212.227.17.11]:54064 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752399AbdIBNI4 (ORCPT ); Sat, 2 Sep 2017 09:08:56 -0400 Received: from [192.168.1.2] ([78.48.84.48]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LmuAa-1dI6H81uiS-00hAbW; Sat, 02 Sep 2017 15:08:50 +0200 Subject: [PATCH 3/4] [media] adv7842: Delete an error message for a failed memory allocation in adv7842_probe() From: SF Markus Elfring To: linux-media@vger.kernel.org, Hans Verkuil , Mauro Carvalho Chehab Cc: LKML , kernel-janitors@vger.kernel.org References: <0e67e095-4931-b78f-a925-7335326ab69c@users.sourceforge.net> Message-ID: <399f1b38-8e53-a52b-8386-4d067444eda9@users.sourceforge.net> Date: Sat, 2 Sep 2017 15:08:49 +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: <0e67e095-4931-b78f-a925-7335326ab69c@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:731o+H3MJneV0eWjwZfDsW7MUrCCmHe+DgUkkC+7YDNJyMxDXKP MTxEHgQWK/hi+onPPYrVcTG9AkgvuxmHmLH3qOs+LrmZrYF/NKpuVf3glsIh6PZzRydhbQ+ LAGKMULzbFZKjXQxKVmHCFNVywsG+hD0PXysdwbY03vE0VRPIcXq55uCmwEQrrdH5/M/Oao 06cRXycRoOHqd8PNkpbeg== X-UI-Out-Filterresults: notjunk:1; V01:K0://JFzro9dYk=:0L0iyZroCgGsPeCJvjl1Li jdbQ+cxcc16o3f6YNNw4IzyE7zu4Zxj4ezfZvinKrjax71AYhrh/L7jjlnm1TVnlCjlFzEq6u TRRsVdLDrzkhfeYnL8VXZSaR+s202vZTL213zqiekZej//h/MvxQpxHqgb5xMhcdzUgsWuyky W74+7/buzZnPEUzr3LTIh7t2+M20gs/sGdbVfmLVrpIqE4nBP9EQtV9CpzwGrZGZepT9rSCMB BpJg8J2K0Hq3+ZFdBtNVk58GqJ7g5XS8bRNErhz0QyrtbYbHqn52/HfQOMu6KD1heB/G0F7pt ZDHJB2LRz+dYvyuCvh9k4rQAFbjQGjuDen4T9CFbDUZQ7UTtRc9TGSKf5sU9XZ8w7ighuZ7Ny s3bOeBVxpUFniTGyAIZ0VvNVFlFbNS0zxIW0KJtoeOhrSgxjuJgfJThSKHccvjGuBUADo62ug I65dyC0Q3nZj63nPPMOf2jhbV0urs8TFfiw5pwGS8lTHyceeUddcKsUOBlbcj+XrKvwj+03Y9 EiRCV395A7BUnsnmZROtLPKeBWnn1koOjIuIG2HZPnnl9iUaAGURSI9+3q5HJSs3RIanDPsgg TSO1zKDlpVTOrMX1mUSerLY47sRw4uw50Tx8LWZdqF/pnJGmXLzrePNZLS6OWnAlpjoaE4tUA NIR4IgOExMghqpvtbMXAujhRrD5Xff54gFe/+y5/JuvlCrODx3E3DSeLy+JKiuZgrMCMD7jUO b/EZ53iycBi391Dqwtg8pzfHlWSt3sbG79XuvjR/OrX9XrHYvA8Y6/DaP5MaucuGFZ1Nsv5by Hc4DErhNfqUw1XHt5LZP2fcMQbl/PCtn8mduLoH6XOpglxAupw= 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: Sat, 2 Sep 2017 12:50:19 +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/i2c/adv7842.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/i2c/adv7842.c b/drivers/media/i2c/adv7842.c index 303effda1a2e..366a294edd7b 100644 --- a/drivers/media/i2c/adv7842.c +++ b/drivers/media/i2c/adv7842.c @@ -3471,7 +3471,5 @@ static int adv7842_probe(struct i2c_client *client, - if (!state) { - v4l_err(client, "Could not allocate adv7842_state memory!\n"); + if (!state) return -ENOMEM; - } /* platform data */ state->pdata = *pdata;