From patchwork Sat Sep 2 15:53:03 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: 9935633 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 0CB94603B5 for ; Sat, 2 Sep 2017 15:54:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F2118223C7 for ; Sat, 2 Sep 2017 15:54:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E63EF23B32; Sat, 2 Sep 2017 15:54:16 +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 A92B328488 for ; Sat, 2 Sep 2017 15:54:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752822AbdIBPxP (ORCPT ); Sat, 2 Sep 2017 11:53:15 -0400 Received: from mout.web.de ([212.227.17.12]:54193 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752707AbdIBPxO (ORCPT ); Sat, 2 Sep 2017 11:53:14 -0400 Received: from [192.168.1.2] ([78.48.84.48]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MQedF-1dw7jB3Wnd-00U3zw; Sat, 02 Sep 2017 17:53:05 +0200 Subject: [PATCH 6/7] [media] ov9740: Delete an error message for a failed memory allocation in ov9740_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: <38d9cec1-44b3-b585-81fd-1b53d279d406@users.sourceforge.net> Date: Sat, 2 Sep 2017 17:53:03 +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:503AMUe3b3xrP/VDrottF/S/3YrybK0p0WDS8u0DIfjtOOgXOEf yErPPeTW2YvaCavbuTgQdwTdK2J9brw15XYXeJjJ4m5fWp9L+boadTJ+SHq28q1PJN3taQx jqrpfLzxU2M5idFWvyjK5B014ViNyLRaWWgik53J7UaT+c75wKyxhuDcjS51trRdGw/gmVt pLDk9eK9viZ2EGbJ0+g7Q== X-UI-Out-Filterresults: notjunk:1; V01:K0:KmPfA5zyw/4=:znQAmrmeR3W/MtRCX4nMdU a9rC0iQAUYTtTtOM/WvaqlkXt4cL6bZ330qEQJZEgsdHJLXkRNRO8QZPIGVTv9iGwt3xAlBPH 2uCeHLdiQlcxtCKTlAm0gSQhMHimM3WftYoDVzGWs/M+O6n8lDe76t6kU/OMkZDUis4mrH/3+ sMPMIAbNxvG/VNlKSuaKhaI8XZ0VefkfHgE3azKwql96X609cuiZSfjms7kEGNPeA4wgjWsd6 Km71GBbvzvYRGCoHjkgdU2+uU8RwuNom50GfiQPF1r12LA5FCzP2dgez/hxVo1kxRUaO+Y+sl Y83zc/3Eq2F9GcTxkUDV9egFbjDmmh1SblouE7KemMftXGpQgO/R2YVwwGXZ6rYapwJ6w0y/L 2xFf0YsqQNE+1vc5QIDJ+Bf1GLGgrhb0v+BBgLfrlGb3KtQKa346WQM0IrHw7AKShl1+SzZYz XMNZF/ZC0i5EfdNma/t7Qvfhz7G5NZ8XIA/niOce1xMNpODFT7WPxak7iiUW4Y3J0qXk48qs6 amzQdVeffs9IPBwr7G5G/oyfPCc2SO7du6vxPfF7+FSsB72qg/8azmoCb0nbXIY1v946uURzQ SD6YtELCi89Vh9+6zcLo4RjQSLzw2hl+wAmTy8vvXMc1ZbRwQUEcqJYwFrPXHfIEkcl19+V67 aVvDcyg94lEXb5dBBcspOqsJksRrrwJ6+nT59vYsFHr16GSiosyqOpIaEOD96KQSWlZ7Ca9mb mk08f5KpHNDcDESRAKA+zQkOq4Ofo3xfUHREcYNMwjz9wJIPHk/SG0lVfCyUkq/37v8wwdiEt Y5CJ30rmBGEgYiHrXjTZ0IzWBIq5LRthzAXJs/WP6jG3D+ThUNy4Fk64kUUMM8dBAngZ6qNES u8EBUDYgEOLlXr1h7m67pQpqjS+8hri1jayt+SMp4cNDein0i/fqK2jda+j2qwz8Jyit0GhuU kUdE3493WYbTcYlVrknM4i0VHcES5dpzYUJ/xXTwlB9yDjnNpPu6PwqoEDm5BM6PgmV923ReI jKdx1RhHS4ib/DxUCngT6/U= 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:44:36 +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/ov9740.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/i2c/soc_camera/ov9740.c b/drivers/media/i2c/soc_camera/ov9740.c index cc07b7ae5407..f44f5da795f9 100644 --- a/drivers/media/i2c/soc_camera/ov9740.c +++ b/drivers/media/i2c/soc_camera/ov9740.c @@ -939,7 +939,5 @@ static int ov9740_probe(struct i2c_client *client, - if (!priv) { - dev_err(&client->dev, "Failed to allocate private data!\n"); + if (!priv) return -ENOMEM; - } v4l2_i2c_subdev_init(&priv->subdev, client, &ov9740_subdev_ops); v4l2_ctrl_handler_init(&priv->hdl, 13);