From patchwork Sat Sep 2 15:48:37 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: 9935611 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 84F6D60216 for ; Sat, 2 Sep 2017 15:49:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 75C7F1FFB2 for ; Sat, 2 Sep 2017 15:49:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 682F328433; Sat, 2 Sep 2017 15:49:14 +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 2551E1FFB2 for ; Sat, 2 Sep 2017 15:49:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752746AbdIBPs7 (ORCPT ); Sat, 2 Sep 2017 11:48:59 -0400 Received: from mout.web.de ([212.227.17.12]:61135 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752684AbdIBPs6 (ORCPT ); Sat, 2 Sep 2017 11:48:58 -0400 Received: from [192.168.1.2] ([78.48.84.48]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LtWo4-1dOhjH163Q-010vDl; Sat, 02 Sep 2017 17:48:39 +0200 Subject: [PATCH 1/7] [media] ov2640: Delete an error message for a failed memory allocation in ov2640_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: <86121882-9d88-0609-1506-a0c785d405fd@users.sourceforge.net> Date: Sat, 2 Sep 2017 17:48:37 +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:BdaDfUnbgO98ocvdovSXObXnjfd9MCItuj7wXC95Smf581Gkmpq Y/YEIw/SZprC5QERpDdqhK7fk4WzxZ7+kvPUm2ylHqCGHs9HVGkSN/spBvQvyxg/udANtOV +DdsBUsjpcNFgvUtUxivitF7743x7Fd3eTHxITvV+VZhsnYCwQ7ARhJSv7S2MTdTPU8Le76 i0XDI2HiUX7hWKW8lnbrA== X-UI-Out-Filterresults: notjunk:1; V01:K0:XXeTFeiTey8=:OTmUhkdZBao+aD7/1dmYtE ByQ0PMI/fhA0ZwWT4JTOwwEAbDvkopE7wfWSwRnJaFTFiULH+nx/pItmP0TxjeZMhdHsKl4cw 3fF2pdMCIiC3xWIIMSnCoJJpUFlFhLQWKeUhxdKnYsqEqn9N/tWjzo4lDxw4QoJXDQyY5vn2a X4XKBlPC1BxuaBY5WbFbk7srv4AjFkn/B5GE90BsXm3eDQNZlhw4/FLocC1v34JXw/Us6X/n4 NvDMVsTcvQNa8raRZ039TMn7ygip8dcnMx69H21PfIAE6Ut4/a4Zio/G1QzEdciCbWyq7nqxC R8TtA6WZd/V3DQDlfMHt2nkLle8Rj9bNT/2Mr4Wn+LJvADWhbAehqrx/dTABRWOQu5IaLxIn6 M7/eSIIe5dYa33OgLsVUykiJtEQQc1LmQvnFP6gD/VqL+B6o4eQA6Dx+XDVCLBBhlK1kzWv7T WVkXAXDP1mbKxqSNCQcpXdnn+nXQQQ4e3pt8rtD0uk6Mvm+hm/sS6zwVQwLENmHhnuPSIA6bX CPeARgD+xbVcYuenQL7HnpXMJVgwvwwLx8O/TKfNNIsMIYQbbmKsf4eUiFbM1dJ2Ag5aOXWLu BlnUrIRDRIL4kc9yoOUSoPZ1YpC5sDFp+zobNrRR1pUNisdTSl2TgNJvrSVFA2W+yHrN4ZHq/ +XYffe2SgS2RFs/6BHXMMfp5xSjkyASIvj2XoDjdnMOGbEHoCMAn6ojlkb9Rr6YD+vTNw2S+m J6K8Ckw70fWXKwEgoQLIIl7GRwc2N4DEN1Amza62nTHA1zYMiUwMTvgYnKyG/IpzAaPlFEZI6 zfslQF7od1hcRQWf5M4coak787ilNG+SpG8Ryg8FVLW/MHvvMo= 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:07:31 +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/ov2640.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/media/i2c/ov2640.c b/drivers/media/i2c/ov2640.c index e6d0c1f64f0b..e4ae53410097 100644 --- a/drivers/media/i2c/ov2640.c +++ b/drivers/media/i2c/ov2640.c @@ -1101,8 +1101,5 @@ static int ov2640_probe(struct i2c_client *client, - if (!priv) { - dev_err(&adapter->dev, - "Failed to allocate memory for private data!\n"); + if (!priv) return -ENOMEM; - } if (client->dev.of_node) { priv->clk = devm_clk_get(&client->dev, "xvclk");