From patchwork Sat Sep 2 15:51:04 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: 9935623 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 D45E660216 for ; Sat, 2 Sep 2017 15:51:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7A0228632 for ; Sat, 2 Sep 2017 15:51:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BC9002863F; Sat, 2 Sep 2017 15:51:41 +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 749C928632 for ; Sat, 2 Sep 2017 15:51:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752816AbdIBPvQ (ORCPT ); Sat, 2 Sep 2017 11:51:16 -0400 Received: from mout.web.de ([217.72.192.78]:56926 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752684AbdIBPvO (ORCPT ); Sat, 2 Sep 2017 11:51:14 -0400 Received: from [192.168.1.2] ([78.48.84.48]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MKrPw-1doAhM3ocS-0003Tm; Sat, 02 Sep 2017 17:51:05 +0200 Subject: [PATCH 4/7] [media] ov9640: Delete an error message for a failed memory allocation in ov9640_probe() From: SF Markus Elfring To: linux-media@vger.kernel.org, Bhumika Goyal , =?UTF-8?Q?Frank_Sch=c3=a4fer?= , Guennadi Liakhovetski , Hans Verkuil , Janusz Krzysztofik , Mauro Carvalho Chehab , Sakari Ailus Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: <4938313f-e5ba-a4b9-f5d5-c53f50f976b1@users.sourceforge.net> Date: Sat, 2 Sep 2017 17:51:04 +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:kjMmLURQjWLVuh0GIRhyy+UW/DgIBoDZI+dV+cAjKM1fUN0AyLF u8gqYDilWcbx716jPAIeao2dEiaOwnnv6e9HTWTbp25pAkh+Xh0FP7YrryxLBRuX49Y6fVs ovSDCiXqKEUFW8IgDWWE35/z0gXSOqGWU6G3ivStLHMqiFYzQ2Tp2tkPfY1ygG7DsjW/vFQ AoBWJL+Pi7dMuQ/3kpK5A== X-UI-Out-Filterresults: notjunk:1; V01:K0:G8fa27XnpVk=:019ztEkyWPg9D3MHZOqE37 xzIK82z0tVtyO3+V+VJmRKj3xt3kvY8aQvoWyAucMRoMr80rT9YfcXyy26LD/doAlPclZWr35 QD85ivqe75DNmIRfs8JpaC+czCIFWzKITOyLyhRjwmge4aL6PyU9I8PMu+Eo2mwcnoYqmYZCi pw92h4AYTh9QzTryX9TDQdeDfHtyECyokAV7UFm5aVlR9sAxToMc+2EsIDL608dPMjO/IP7kP me42bzOv1N1XhfHKzifzuWG8qKk/O7Yi3LNvLsZkzdS8WaeVSeu5MqWSKTgbrDU7Eh2KjI7z5 eFkUmJocZnOmHk6XB/hS/R6f5tYvcIFTirdoNPPY02ZJSGnkUwal5TlYlMpUK//cvlnRiXErn i05KKSl5ZvyZWmZ7hdxwjLHl2BC9/DUrCodEnhd2lnh/R9lieL/ifCPAUw6QlGndeEGH2BTC1 vbJ9vKslXhJCwCUPJALz42Kl8g4Sexb50eyNZW5xW+549cC/n36w8YIfzx5+VeqD3JnYfKNBs pQ9s28ouDCiyEXLDDPxh7/C+Bu7OjukMmxQaOVCLTDr3u0oArvGcuEzkpWI/AGu+sOe0So5NZ izz7YA/+MAx3k/7WvRBvz0vIiYZbkeefhaK7Z3O8k4l9Hcw02Tkjo8WJNz+CVZxxuhP+A6cjg l1+VW2DFcZzvH5RHqI8+ChJtEMvES36CpCBanZyuUrTyU0NN0hoa9r3w8v8TzVz2TsSsPEC8o iLhthSZiW8VH7bShNk9Yg5s39LqvWf61lQ6oBY0LM3GfPhLqRjk/WjaYQA/ReiTtkHuqCkhVU 6f1c/T0sB6OBOyHfhgkNMYa2DxnAkEwav8vXYF/e58r9RdzZFw= 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 16:34:27 +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/soc_camera/ov9640.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/media/i2c/soc_camera/ov9640.c b/drivers/media/i2c/soc_camera/ov9640.c index 0146d1f7aacb..0f02f022f3e9 100644 --- a/drivers/media/i2c/soc_camera/ov9640.c +++ b/drivers/media/i2c/soc_camera/ov9640.c @@ -679,8 +679,5 @@ static int ov9640_probe(struct i2c_client *client, - if (!priv) { - dev_err(&client->dev, - "Failed to allocate memory for private data!\n"); + if (!priv) return -ENOMEM; - } v4l2_i2c_subdev_init(&priv->subdev, client, &ov9640_subdev_ops);