Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757039AbdIHUPa (ORCPT ); Fri, 8 Sep 2017 16:15:30 -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 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-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 954 Lines: 30 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 --- 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)) -- 2.14.1