From patchwork Mon Sep 18 17:39:40 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: 9957231 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 E0BC1601E9 for ; Mon, 18 Sep 2017 17:40:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE61228D83 for ; Mon, 18 Sep 2017 17:40:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C336028D87; Mon, 18 Sep 2017 17:40: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 6BD2528D83 for ; Mon, 18 Sep 2017 17:40:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753874AbdIRRkA (ORCPT ); Mon, 18 Sep 2017 13:40:00 -0400 Received: from mout.web.de ([212.227.17.11]:53835 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753728AbdIRRj6 (ORCPT ); Mon, 18 Sep 2017 13:39:58 -0400 Received: from [192.168.1.2] ([78.48.130.71]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LnB9V-1dSw4i3Lkz-00hRTu; Mon, 18 Sep 2017 19:39:45 +0200 To: linux-media@vger.kernel.org, Hans Verkuil , Masahiro Yamada , Mauro Carvalho Chehab , Sakari Ailus Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Subject: [PATCH] [media] jl2005bcd: Delete an error message for a failed memory allocation in jl2005c_dostream() Message-ID: <7b118f3d-99e0-1936-16d4-09151a5da006@users.sourceforge.net> Date: Mon, 18 Sep 2017 19:39:40 +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:eX81PdgDp1jysMkrFO2MC3gGy0h0UIDQDciv8DbxvoYDIQ57iW2 gDYs/KCZUqWgP8URK8wyzZVdO0Pmw9ofdl+ZMf55HtEZ4bwn9qTVbHrsMEPK/cDkdkwQWSw Rib5XYc+QehW/ovFvMPQgDz27mMJ6DYBPfxY8thIaU02URC8j3/HW5A8c75XS67JY0DW1dp U1Qfv6i6EgL8RmN1kYOzA== X-UI-Out-Filterresults: notjunk:1; V01:K0:xBgXgqbjxUg=:APo/rkB8+QJ/1QaTtHiv2c gVozBZjD7wp6psbSBwz5YqhJ4kKHPWiycszBduY7IzL9tvyJ/dVrm7pNlZ/hj2eFm/FU4raRm w91gjcwwoonKPviqh/MewgCTNsASjUoEO34a3nl3KBHKAO+YzFap6g7cS1Gaw4DGNeEqcnjAL EiVQ5sAYn/k36GfLH7ddbKu5RCXNCMZAiV1zYPx1f/xsy3fO9Jr2IxYo1BMoRBltBUQMj0+04 OUCSaPp2dF0wsmKz4PGPk48bf+Q4Hi8kCQ2PbgcEA7XxLfgZPjcYh+19qW5YF5m4l3AohbftI gksmMi/bI/iXitLQ0jXeO/T2iie5kg1088DsMcI3WoY67qhhb6CYcyH3K7fcubnXYvMYWa9lO vLMcc7r5lRtJMBOG1/FCEqqSA7RIqh3CV5PpxB7a2+/VqgnUa0ckvCWSOVbHJYDyWVberqVT6 DgC1tqc3RcnGWNWKgv1OF3sX9NvZ+2asjzDKixaSHwPsRf944KftgLBe4lI1xf/03pyIDN6F/ Z+wUqw72lV8m4dkh3Fo9nTYXizPZ2CFqkocfJbVJJLzPDwtyaktxbG2otOi8ulGrJ7ToOaVUp kwTjpPDT80oFvgbawCVoHIX6DO6Ojr9EOy035SjykOCTAyvb+Ui4uErjOq+GklZWsBH7GJWYf 1pKO/w61VbwFM3nivzZRMMydCND9j1J6T9HBq3mYFVaQGPrmAf/GBdBtydRtkeo9Tgyrf7Teh +MoKYZLnlFMf0JfWui93yMjqNQLzjiITMHmfnDt8JLvMd0HDWQC9PN0zZCErVpKHJObinKJey 9vuzjK2jl4grD/wQdxvhh71N84v0/2tvV9dGApoQz6joGZNBns= 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, 18 Sep 2017 19:24:24 +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/usb/gspca/jl2005bcd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/usb/gspca/jl2005bcd.c b/drivers/media/usb/gspca/jl2005bcd.c index 17c7a953564c..23400ead1919 100644 --- a/drivers/media/usb/gspca/jl2005bcd.c +++ b/drivers/media/usb/gspca/jl2005bcd.c @@ -320,10 +320,8 @@ static void jl2005c_dostream(struct work_struct *work) u8 *buffer; buffer = kmalloc(JL2005C_MAX_TRANSFER, GFP_KERNEL | GFP_DMA); - if (!buffer) { - pr_err("Couldn't allocate USB buffer\n"); + if (!buffer) goto quit_stream; - } while (gspca_dev->present && gspca_dev->streaming) { #ifdef CONFIG_PM