From patchwork Sat Sep 2 15:50:16 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: 9935619 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 83B1660216 for ; Sat, 2 Sep 2017 15:50:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 77BF928632 for ; Sat, 2 Sep 2017 15:50:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6C8672863E; Sat, 2 Sep 2017 15:50:44 +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 0852F28632 for ; Sat, 2 Sep 2017 15:50:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752718AbdIBPu3 (ORCPT ); Sat, 2 Sep 2017 11:50:29 -0400 Received: from mout.web.de ([217.72.192.78]:59595 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752684AbdIBPu2 (ORCPT ); Sat, 2 Sep 2017 11:50:28 -0400 Received: from [192.168.1.2] ([78.48.84.48]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0M4ZTk-1dZf8P2UYu-00ykMd; Sat, 02 Sep 2017 17:50:17 +0200 Subject: [PATCH 3/7] [media] ov6650: Delete an error message for a failed memory allocation in ov6650_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: <32edb708-92f9-c51b-d424-aa975ca49b92@users.sourceforge.net> Date: Sat, 2 Sep 2017 17:50:16 +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:z3EPhIb8XbOjg2U3fyBCBghLLQVyLtIhc0ofx82YFRxVFDf55SI 4NwM+XkuXHyZFtOHkK3i02UIz64pf1iMBv45OTEKbgMAT3KQ6d0y1891WQwyC9gHn9AFPVS lvhmSJQo6DLcCg2QR4aiSYLpwMaQzsso7gDUdPUwC35ZVHjU7Q3/mwykLtYmgsVzMkC1l5v JP0eierS+eq6uaFuoiwtQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:Zu9HtXXlBcQ=:UHwKwCQvooBWaDB1Kmz2nF rvkRznTsEIBA3xW+6y6dl2JQwGOwrBtw6e01OIzNdo1RVZb9/ZgahZ4jnUalMsMtKPQH0lt60 /ravmRoDYPynMsY8joyugBCwVGOXrHVsf0L+hZ0ZogBLpMZ3BxFerdDjUCH+8hjDWryI6ALDl wOFHZff5n2VCfxbjcKKR2uKSlnrx+x1V5tQOa3DpTnCS5i/bcLCSUgRsWF+31gLqpmMcUsABA HtQVQd2e0/X4rzSxWaNsd4mXgNuVyZfeww19ydIelhBDmG4ON7ZUEyhjnBP5zpTGzcnTzoA54 gezW9n/PoeiNjKqAlGQDVqIafksXKQMw4ckwpH0BAxgQLgdIhmGhZz8bJtDxWdixFLYx0AoQo R7oW6NDvGmtgJxG2oWN3QagqlVWcCm9IVVOJIQv7MVSWBEsdSMONVMEuR+lKf8fYLfaoQ5cEt VfUn/EW3FyH1ykWWcimG5c9Pa42JIsyBOzMheWWbLTU/zv5GseFV/6TOiF6w5NHUrkf99cRgL FfSVd0CV4bkJhmfL27TUkvLEsk3jWBFio8LiaLAQY0HCg9qJ/FvuYKX+U8odT6SzJEOssIsjd LJKuvp6m8X0CLyl4eyw3Gl2K9SooVGF5g6ptwzAu5iW6mDgdb1+eMTi0NPw3OyWAovyhOjjKv iUjdRg6zREOmHV+JCe7k7wLqx1s2FpvlVInT9itCKhwCIxPUtsJZsEGQwToyq9NcNnfx/en8P IwNRsC48q4CBZ+mTmCxsL6VDrqm2EL6u6E9GTa1GW8ZDliQ3Ejn+kYAwKmIfcguFELU3Xr4lw dZqWkTszFehlhkSjMJptJNKt3xffeFrK6AAfmOk9BCos9vYXLw= 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:16:39 +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/ov6650.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/media/i2c/ov6650.c b/drivers/media/i2c/ov6650.c index 768f2950ea36..8975d16b2b24 100644 --- a/drivers/media/i2c/ov6650.c +++ b/drivers/media/i2c/ov6650.c @@ -954,8 +954,5 @@ static int ov6650_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, &ov6650_subdev_ops); v4l2_ctrl_handler_init(&priv->hdl, 13);