From patchwork Mon Aug 28 10:09:57 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: 9925135 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 32CE760375 for ; Mon, 28 Aug 2017 10:10:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2447328066 for ; Mon, 28 Aug 2017 10:10:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 193DC2852C; Mon, 28 Aug 2017 10:10:26 +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 D828F28066 for ; Mon, 28 Aug 2017 10:10:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751404AbdH1KKM (ORCPT ); Mon, 28 Aug 2017 06:10:12 -0400 Received: from mout.web.de ([212.227.17.11]:50325 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751194AbdH1KKK (ORCPT ); Mon, 28 Aug 2017 06:10:10 -0400 Received: from [192.168.1.2] ([78.48.87.233]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MLgQp-1dlRe12Y6N-000vnW; Mon, 28 Aug 2017 12:09:58 +0200 Subject: [PATCH 1/2] [media] Cypress: Delete an error message for a failed memory allocation in cypress_load_firmware() From: SF Markus Elfring To: linux-media@vger.kernel.org, Antti Palosaari , Mauro Carvalho Chehab Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: <4c7cfbac-b9e5-4ab2-d569-d44cae90678e@users.sourceforge.net> Date: Mon, 28 Aug 2017 12:09:57 +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:xmzDiYxHSIztJty8aFiIEjkyDdCJopRW9X6ZSkoQ26bSiNoGbF3 UFoWFbrJXKbedTD82B6h/OZ+h+dwVeIfD/QqevCZdtUez78RKGBMR1nJkiTPYVOPgPPEeDA Gyz5kVRrsG067u9hggtQhLYBclCooyRHA45LIQ6gyJKLXN44WTvMdvc7/gJafZ3JvM1NNus CWzZiRD82krhu9cDa2jtg== X-UI-Out-Filterresults: notjunk:1; V01:K0:hN+j30+eTzQ=:XTFj+aZg6qtUyc+x7jHnDQ 0+k0WudM0ixwmXSd3PfPJCLqL+geJFuMpTalwC7WcMjVvhs08HMGrDzE6/lQ3qdyvGIxV7wiP ggad5TrMkiz/z5Pa0yqM9N+1HJgWewfO7r1NC7Mihq9zD2IpRI+tuCPf1VQX7UV0iiNs0U6Fv GxEPY6xDNNgSxlg/QyznWryPFZUGPM4yMb/ACUeb0i/gxE7UUKVEUYiCQe9hBIi1UrnBXkrbf uukG8SXyXZXgStjUVY3rAFaKXpU2t9E2TSVDtk4Ux8d7vfryQJZnvRctr6q16BB2wjz9zVJYr jAvi72IvXskHs7RLiqmRXDzWZUZnMQofZNK3jN1oKJ2IQPpjtfuw0EOSh1D+RnK4oW2DvTV6y gPMe/n8tWteYdO++iPMStAtdf1PYQ2SvlFtlCPVSJiGs7Ukhtum6DX7d6ZuZdyQq69mY0uBUR /JwBJwq2WbPSgVxGforS3NF4dRSzjOMRiLb+wWmgmeHt7UBdXszqwU6y36ne+3g6GbMzlrSRi 6lKNdIVXWkl+M3XckJD3+K1IVvngIJsRLn3AfqucibeTgF8NqUAxgTFf/dKsk8hAVhWDu32y2 CCDcSPSQ88CSezumaAatAJa6mjOH2AM8qqUfMzMNHj8N4jAmAJ2Ni/6+ZBo3dUHlefEmeD4XL 29D3SAD/X6wfaVBjT2YDzkAE/WVMSLeUtPbUDDJeAaVSxQLrdts+M5I1sSVLbnSyH8XoQZ/uT EgVpI2NgrCiJc1XIV7oQJ2c9D49Rh67iPfKQm7gqIDTAd4jGX2j6w+NxC+MMBEVVCLyiQSy03 EUGWXPzDAeAZrX96x8Ri4XqZjmhNC504iP/lm0hg34WlshAEo4= 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: Mon, 28 Aug 2017 11:46:57 +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/common/cypress_firmware.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/common/cypress_firmware.c b/drivers/media/common/cypress_firmware.c index 50e3f76d4847..bfe47bc5f716 100644 --- a/drivers/media/common/cypress_firmware.c +++ b/drivers/media/common/cypress_firmware.c @@ -78,7 +78,5 @@ int cypress_load_firmware(struct usb_device *udev, - if (!hx) { - dev_err(&udev->dev, "%s: kmalloc() failed\n", KBUILD_MODNAME); + if (!hx) return -ENOMEM; - } /* stop the CPU */ hx->data[0] = 1;