From patchwork Sat Sep 2 20:45:07 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: 9935825 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 42D7E601A1 for ; Sat, 2 Sep 2017 20:46:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 35CC928680 for ; Sat, 2 Sep 2017 20:46:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2B0222868C; Sat, 2 Sep 2017 20:46:27 +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 E9A1628680 for ; Sat, 2 Sep 2017 20:46:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752801AbdIBUpN (ORCPT ); Sat, 2 Sep 2017 16:45:13 -0400 Received: from mout.web.de ([212.227.17.12]:51144 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751192AbdIBUpM (ORCPT ); Sat, 2 Sep 2017 16:45:12 -0400 Received: from [192.168.1.2] ([78.48.84.48]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0Lzb94-1dRvHi06Bm-014kdI; Sat, 02 Sep 2017 22:45:08 +0200 Subject: [PATCH 5/7] [media] Mantis: Delete an error message for a failed memory allocation in mantis_pci_probe() From: SF Markus Elfring To: linux-media@vger.kernel.org, Mauro Carvalho Chehab Cc: LKML , kernel-janitors@vger.kernel.org References: <9ba22d42-0ec0-b865-dec5-4ce67ad443fb@users.sourceforge.net> Message-ID: Date: Sat, 2 Sep 2017 22:45:07 +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: <9ba22d42-0ec0-b865-dec5-4ce67ad443fb@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:rmnrGH+LHfgSlIboJ5e5ToVxhWZTny69KfR189ezIcGtxovbm/U e/DUMcn7BuPePqiG+o1JdOjjUdi6nrEfG4rpT5SIR86GtaTB2fDbRsBCqz8PAD7nexz6mWv P0k5C/L9aCF8Zax6JTu/JlJ7zQ+Xp+JqjjBLPRxuWVnWB4uaX4oQNH7mz+fAtJjmF2YczEO Wx0Hg2zPvsQaHA4INqSRw== X-UI-Out-Filterresults: notjunk:1; V01:K0:xvMnbvo9350=:1UjbsTxHfVKt+I8jf/isZ8 IQbBkwY74pjTJ8TxlcLcf/k2RUR93oy0Wac70CATepaHYPFvDt2pctZFgL1zYOnFkwL4tftL5 gfPPCqPLi/TXtwydmZvVRDl4pKpZHhNRgVrDUBP+zvublHR75OUtgEOcQMjPTZ1WduoaLguAW 0JTCkgVcgSKG2AkbGgDkB1euHFivY8Ok263D8S4Yrad2gryHM+5o1ZEkGF6V8AWlNgNPygMx3 cVRQcz9pvmHnafn3TT5Vm9MgF72anfI0SHcpOaayKPPVoxo/y4nvyojqk00JAnFP2bELrU+rl h2/WiyhPaFbhTrLIxt1rab2QJ0FdX6g2+6dyndgJyLPkK1XzylaF3/Cb42efHauL79/IMeNkP o1WSfkmun9HJ10HumHC6soTL4jmBJekH2z/imLpza4Rnq+OXLlHu8MmnvgJUAx+84bMsmAEh1 ETvPbn+vQ/+lR8QcyKXyVEcO0yl3lmkc1tF2Sh12mJnAm9r3f6EuSQbXWrh+PW8gERo8PLlhY e5vDk4BJ93FZ4FnX1Gp2v35q0HhMC6NyLIjsBz/0Qk3i2vDe8pC3ksjLmeNCW49ZHzEtag8B+ 7tUiSqfXw1GbiKQHzJ4Ra+WZY+46U9XKz8i8yP6XTW/0y5YJKNJbcvCmvVXrWC0TkW/EUCs6N 9Par5Q7hojjLp8gosGkEF/lEkQ+cNKALA+tvkP4bgALZabni+NyiwVoRhTRL4DJFuoarja/7j hxKCDw1KBqVIlJT9RXNSFbsVmvaVHsPtiuSdGj0pVzWbXFAVa4VUsLaIMzgewcW8Qj70HPLts 5rkp9qUxxjnyB7+lG3GhYgxrmn1fQcFoLV5Y6uIgocVWH0T1dc= 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: Sat, 2 Sep 2017 21:55:05 +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/pci/mantis/mantis_cards.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/pci/mantis/mantis_cards.c b/drivers/media/pci/mantis/mantis_cards.c index cdefffc16d9e..56a01f6f84c7 100644 --- a/drivers/media/pci/mantis/mantis_cards.c +++ b/drivers/media/pci/mantis/mantis_cards.c @@ -177,7 +177,5 @@ static int mantis_pci_probe(struct pci_dev *pdev, - if (mantis == NULL) { - printk(KERN_ERR "%s ERROR: Out of memory\n", __func__); + if (!mantis) return -ENOMEM; - } drvdata = (void *)pci_id->driver_data; mantis->num = devs;