From patchwork Fri Sep 8 20:14:59 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: 9944981 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 71AB6604D5 for ; Fri, 8 Sep 2017 20:16:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 69F9428902 for ; Fri, 8 Sep 2017 20:16:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E8B528904; Fri, 8 Sep 2017 20:16:13 +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 1DE8428901 for ; Fri, 8 Sep 2017 20:16:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756846AbdIHUP3 (ORCPT ); Fri, 8 Sep 2017 16:15:29 -0400 Received: from mout.web.de ([212.227.17.12]:53645 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752434AbdIHUP2 (ORCPT ); Fri, 8 Sep 2017 16:15:28 -0400 Received: from [192.168.1.2] ([92.228.166.205]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0Lp760-1dDlXn2L9Y-00exen; Fri, 08 Sep 2017 22:15:03 +0200 To: linux-media@vger.kernel.org, Hans Verkuil , Mauro Carvalho Chehab , Petr Cvek , Robert Jarzmik , Sakari Ailus , Wei Yongjun Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] [media] pxa_camera: Delete an error message for a failed memory allocation in pxa_camera_probe() Message-ID: Date: Fri, 8 Sep 2017 22:14:59 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 Content-Language: en-GB X-Provags-ID: V03:K0:sHJmbsvlMbxi/hJSvtqlYPP20ojQ/vaDiZi0yLZhk69+/zTpAal lgyBhMgqIw9g8jkdWzWMXzrwvn+ZwFdMRr+VpJ7dQlDVCY+pG//pGEchwj9lDs1mSOO15RG HYewsWBBcTCzk1AI22EweTv831xEpL+gWwD0m2tva0kec4L0Ch/tM51LfZAGLRTL1NGDeyH 5OKtXtxdpolTHyyXxgkaA== X-UI-Out-Filterresults: notjunk:1; V01:K0:0Q9utgIQoXg=:i5HEGoioECXz7Epr8K+MlT siEXVAyd1k0vKVIjNL/iSSrGApVSmoDFT76ino6d5vFckMFC9bDv/Nv5W9Z6UsGdQl9ge30A9 Sab44Jmmr2RFX0VfNimF+mCztUXkI7Mvumdu6uDb35XcDmbJ1A2AIjDCci+afVD9os9j9aYdg On0EEW2rY99Ueub/Xfokff53w4qYnhxaE/goRd56NvN7xRMhDjs4XcykW2pNgzI/nhMJkp4tL 3wnFTVIupL0w9mTQ/6CLURDnblKjwYqEOU2S2/L0AlOuKxSdntwNLBBq3q1F02c7PkE5zCk2d CcXdqNR0P93VhXwHiwhEyW2YDc00Pc7CY5NR7gv00n6VmyPlHkvQi024544iqVrNFr24XdZ+c 85OimK6jLcFLhKLtsvZxLAIHc8SKHC8BJKSmf+16iaQtLBr4OwUnFYvYP97tdgWJCvLISQ+qB DshHxR6Mk1ZPVePGPMKpvvR0FOLs+P8QwsXbzB1k1vicVCEDlfbrHkCUnVXN9jYbclayP1XTT RSClkJ4wpduNTi0UyfKyEJYT1kHBGRhXLRreqti5Nqx1g05KtlDXSUUN3A5eJKl7mytnEWvHt 5xl4fp/KWhWC24xbZU8GkPcWLPD2+gdYG72wfe8MnJP13K86lPmMWtVvn7w6xBPwVnjlBMNZR c1EkTVgVvLfcVFzNUUSHnN4Er67ssjiyEs6zXiNc5+pPXMzQQ958vD0Pn0aI/h2iDIuEJfBd8 eNXiFObzWnQydWKWlg67r4iGoCinKsFT4llaz7YOnoO2OTCgDBkS/x0iX2eJX4UAuWqn4Pf/A CUeYRv7REDD17KKZQ1+sIhLqwlyQBSStlKfCHSjFG9WoRfNtDc= 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: Fri, 8 Sep 2017 22:05:14 +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 Acked-by: Robert Jarzmik --- drivers/media/platform/pxa_camera.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform/pxa_camera.c index edca993c2b1f..d2a4432a98ea 100644 --- a/drivers/media/platform/pxa_camera.c +++ b/drivers/media/platform/pxa_camera.c @@ -2362,10 +2362,8 @@ static int pxa_camera_probe(struct platform_device *pdev) return -ENODEV; pcdev = devm_kzalloc(&pdev->dev, sizeof(*pcdev), GFP_KERNEL); - if (!pcdev) { - dev_err(&pdev->dev, "Could not allocate pcdev\n"); + if (!pcdev) return -ENOMEM; - } pcdev->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(pcdev->clk))