From patchwork Tue Aug 29 11:04:49 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: 9927065 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 7D9416022E for ; Tue, 29 Aug 2017 11:05:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 76494287AC for ; Tue, 29 Aug 2017 11:05:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6B07F288C2; Tue, 29 Aug 2017 11:05:24 +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 D75B2287AC for ; Tue, 29 Aug 2017 11:05:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752473AbdH2LFI (ORCPT ); Tue, 29 Aug 2017 07:05:08 -0400 Received: from mout.web.de ([212.227.15.14]:51223 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751485AbdH2LFF (ORCPT ); Tue, 29 Aug 2017 07:05:05 -0400 Received: from [192.168.1.2] ([77.181.80.150]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LsyBm-1dP5s83I78-012VjC; Tue, 29 Aug 2017 13:04:51 +0200 Subject: [PATCH 1/2] [media] imon: Delete an error message for a failed memory allocation in imon_init_intf0() From: SF Markus Elfring To: linux-media@vger.kernel.org, Andi Shyti , Arnd Bergmann , Geliang Tang , Hans Verkuil , Mauro Carvalho Chehab , Sakari Ailus , Sean Young , Wolfram Sang Cc: LKML , kernel-janitors@vger.kernel.org References: <09417655-9241-72f4-6484-a3c8b3eae87a@users.sourceforge.net> Message-ID: Date: Tue, 29 Aug 2017 13:04:49 +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: <09417655-9241-72f4-6484-a3c8b3eae87a@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:MoWmUHBKDprFXM5YN3Uecl4q6P5acnRMnYsgSf6cZ1ZTJw0EF4N 3wKcKc6LQsMcdh+405zBy6Z5PPblJSteCrTJYUBLQop5BAocVM787BzkBEI6d2dKLkM+3CA Yvw3rMYH6vzdFKTb3w/Jb86daD3G+ahTvtZwM1e+TKsyUUoG5o12G9oVJ3WjpAayKreiVTZ 4pV9FEm7jsDHcctScxCIw== X-UI-Out-Filterresults: notjunk:1; V01:K0:MfqrgTdXVyY=:SgQVaWg5CPntF8mpsA025y iqGvndnqKPRY4QyrS/XqYTol1BKa67YagnWR7P62FENFfze0JdCJQ34+qh2vbX/FeLop4Zzz0 JXHLS9jqrQg1Tz3NJoxxbuSZz+K6Uod4fgc6mEpj7HjTKZ/mEObFgD01YN0FUU/l8fP9OM8rf Xhk6+gufQ8nt1rrBe47m6R1e2EOMZ7lZhQJr1LG2mSxQ+3VoMMTyhRWdoULjiJ96TcDAcvqhk xYOMqwm35fS4C1WXPB3XCU38I2jrGKU4az9G/571ydStNL4RArtWhXwqK0K3xG7Tg45SJeRjs b06Z9MuKKEB9tMbmkKhxenaty9OdkkM4SU+uH/G7TG7hHpV+d11Y06YGJYvraZYGHq9w9hzE0 F/hfik+mYDuulLWvCzJ6KP7IOBuJXRl1oEojoQ2G8/+pvgsfVMHQCw2Z80UpRs7HsI5AKifxj 6SPHeog0qTTguU+eDwU+sDFEkgVS6Nn9mbnMczBEcr3KZthDePIiYhmqcmVixuGeoWxbjHVno jO5OhyVpXjsNpM2qLVyVVSrmo7D6vy+OD2LwSt9Umna82HMxYt01V8qaFWVBgvQCmsHTobJv1 jjoN9tGuK30pQVNSWpTETfC6nm+HqDPcqYeEUbU1nQoH2pkTiVil+IQ97pOZLgcgqYhUl8ZZB CSrao0PxW6FO2MxYMvN2Y4aRAlBS8imGdTK/t8NKUyu6u/XdFXjvcpTtHOdgu3FBgHAkI75j+ 1hPLl54RgSVgumhUDipsNVnvkkfH+2p//AcPPtWdqOVcZpbCdtZSrRVYXYUw6Y8c71+5KUKfP dSZHltVNtOeFcoL2VaVXJQredQNiUDOmygIVfhyXt2K4DLmS5Y= 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: Tue, 29 Aug 2017 12:40:07 +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/rc/imon.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c index bd76534a2749..e6978f1b7f2c 100644 --- a/drivers/media/rc/imon.c +++ b/drivers/media/rc/imon.c @@ -2313,7 +2313,6 @@ static struct imon_context *imon_init_intf0(struct usb_interface *intf, - if (!ictx) { - dev_err(dev, "%s: kzalloc failed for context", __func__); + if (!ictx) goto exit; - } + rx_urb = usb_alloc_urb(0, GFP_KERNEL); if (!rx_urb) goto rx_urb_alloc_failed;