From patchwork Thu Sep 14 10:34:27 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: 9952723 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 4D5F460317 for ; Thu, 14 Sep 2017 10:34:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2BC8D28A2D for ; Thu, 14 Sep 2017 10:34:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1FEA928E6C; Thu, 14 Sep 2017 10:34:54 +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 CB2EC28A2D for ; Thu, 14 Sep 2017 10:34:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751980AbdINKen (ORCPT ); Thu, 14 Sep 2017 06:34:43 -0400 Received: from mout.web.de ([212.227.17.11]:62935 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751882AbdINKej (ORCPT ); Thu, 14 Sep 2017 06:34:39 -0400 Received: from [192.168.1.2] ([85.182.44.111]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LkPjj-1dGtbS0N91-00cTFn; Thu, 14 Sep 2017 12:34:29 +0200 Subject: [PATCH 4/8] [media] ttusb_dec: Delete an error message for a failed memory allocation in ttusb_dec_probe() From: SF Markus Elfring To: linux-media@vger.kernel.org, Arvind Yadav , Hans Verkuil , Laurent Pinchart , Mauro Carvalho Chehab , Sakari Ailus Cc: LKML , kernel-janitors@vger.kernel.org References: <66b087d3-6dd3-1e1c-d33d-e34c9e2ffe25@users.sourceforge.net> Message-ID: Date: Thu, 14 Sep 2017 12:34:27 +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: <66b087d3-6dd3-1e1c-d33d-e34c9e2ffe25@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:HnAFWL82/a+IsPadn2v/oaOlZc5XBrjiVUOVIcfSFSXqgWLEGdm KEwKY/rmOT3CepiMmB7QY3Kobhpzrf+DBZQeuxAtat8+r+Q8EHRPX1NmQfTsziHvm4ww4YW by9AajpnQSA5sDs0OGueJ16HMpPH2S//fP2/nMKZKsTvXhbcT9pm3djjAueJiNbvadYk93G C/57mlgdykKbygv1nUlbg== X-UI-Out-Filterresults: notjunk:1; V01:K0:Eqh93MrxfuA=:G9+IzSCV9D8DCkYHAYK8x/ 1G5xX6ZqorHPfPmXX0JWAIc4wNL3OaRWcZdnsdHboNfFAPagU9F5EUJQq4DcEhMmrO+lK4YLd RqoOQjigEfDAMMaN02c0avWjCUplBlARDsAfd25Q49W/HHA8zAZiNQovb+0/shd0UqVNK4phF ZUGPD9FIYJ2bZpCHuqLwqL4QpToiU10SllTbT/pL2wpzOYftjtCgU8npHA2rDjY1DpvWpZ53A JGUCKVXU52pesCbYy6nQXXJz6Ogxkw58evQ+Iz2dAzvKQa/W6u87DzgFEX1udJjrPEoMlgdNI PQEskgLfwDtcD8wV0yoPiwsDoFCovcG1BVVQEYyU2RAvwfMIYkfQ1eYjyyqG7jXizgNYelOZy dwzRslHZ7NGE4Z4xUeYF8XRYLbXskyI/DyD3se297WJUnYveCS5PKzZXpA+vpMdrhW6OOteHX kKJP5VUO1953SeLWHp5lH1sXfMGQB0cOQwVuvI4dup2ZwN9y7uUlmIJTGnuwH66BI/lExR+sW f//lRhtCNl9vdGNGgaum7svTSJ7nnm58XCAy+7/9PcP0RsGcH8e4AL0A86MoMsMNyVsI+/Cja wPzClIBoDltkNOjXh3sbJrzc05Inq7KJIVwrNVhr/e5zpAQVd/7IeX1KXHk69c1l4P3rcVWxc 2KdyrqfhWM8xR9WzbsVsEi/1XhTmsX2Z5MxMmSujcCKrCyHUhTg7c+Ta2sAhcA7p5Uevz61uP /rtNbEeouHkcX34J/K6UXbTC0yAzCKcgMyIhrmSFInwEvcW1wUluZNMyV8HFOAPwWFI8Z0Sxa yJABb66jIFIos0tI80Rw0lo7YIfvl+2hBGDnG6d/NhYvrZ54MY= 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: Wed, 13 Sep 2017 20:10:39 +0200 Omit an extra message for a memory allocation failure in this function. Signed-off-by: Markus Elfring --- drivers/media/usb/ttusb-dec/ttusb_dec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/usb/ttusb-dec/ttusb_dec.c b/drivers/media/usb/ttusb-dec/ttusb_dec.c index 76070da3b7c7..26d637684b30 100644 --- a/drivers/media/usb/ttusb-dec/ttusb_dec.c +++ b/drivers/media/usb/ttusb-dec/ttusb_dec.c @@ -1659,10 +1659,8 @@ static int ttusb_dec_probe(struct usb_interface *intf, udev = interface_to_usbdev(intf); dec = kzalloc(sizeof(*dec), GFP_KERNEL); - if (!dec) { - printk("%s: couldn't allocate memory.\n", __func__); + if (!dec) return -ENOMEM; - } usb_set_intfdata(intf, (void *)dec);