From patchwork Sun Sep 3 20:31:10 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: 9936561 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 15593603D7 for ; Sun, 3 Sep 2017 20:31:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 092DC285EF for ; Sun, 3 Sep 2017 20:31:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E9557286B5; Sun, 3 Sep 2017 20:31:50 +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 A786C2863D for ; Sun, 3 Sep 2017 20:31:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752839AbdICUbc (ORCPT ); Sun, 3 Sep 2017 16:31:32 -0400 Received: from mout.web.de ([212.227.15.14]:49394 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752219AbdICUbb (ORCPT ); Sun, 3 Sep 2017 16:31:31 -0400 Received: from [192.168.1.2] ([78.48.243.242]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MPaxV-1dtIVy26Kn-004k7m; Sun, 03 Sep 2017 22:31:11 +0200 Subject: [PATCH 1/7] [media] saa7164: Delete an error message for a failed memory allocation in saa7164_buffer_alloc() From: SF Markus Elfring To: linux-media@vger.kernel.org, Hans Verkuil , Mauro Carvalho Chehab , Sakari Ailus Cc: LKML , kernel-janitors@vger.kernel.org References: <170abf7f-3b62-a37c-966a-8b574acae230@users.sourceforge.net> Message-ID: <6946d617-7c6d-aff8-5267-d260b64b2085@users.sourceforge.net> Date: Sun, 3 Sep 2017 22:31:10 +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: <170abf7f-3b62-a37c-966a-8b574acae230@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:HlfoM/lqosiNbVJDkL0cl+wI7c1wdms6S71A4s7hfl/o/cOUfHo AWKFxkzFdB5apMDHW0HH2m5/UnYwvAqOCSYL/VyB9ykDXN3SbBo7h+ueCflZYrkPfmWheX8 T9c6me5unHr9gEIKcg23y+qlJ5d8EJ8be3o+LYg6yxR1NkKNG8FQKywDw8dHM58St0j1+Nm sMtBWiYcZabwamZJ+zR4g== X-UI-Out-Filterresults: notjunk:1; V01:K0:ep7iGFdyaTg=:SnvGDn5mYBVuu0hiMqFW59 uqEk2NjbnTgj9zX+vZ7F6TO196GU/sJr4xYGKCjNkl8sd/CTKDT7Zt/AUnsILVgwbneQPjed1 5GRLS/n6Ncc6zNkCJ249FWJn7ZlptrQlIU92GUk/wLIeT+U/aujsuo5e3dR4y5O2z6cPe/FI7 TFu9pHCULZL5j8XI69J12hOcdytC4LIN5+NyIdCRimg6c7ALlBx6+HbEqPrSbRiVKWrqgwCET 01bTj3SEF/yjF8zT1FjJQ/My1PcS6DPZcZDMiefj+4k0bQURnd4tR5T4kWoPSENyTWWSbPzyU H/zvxOuHBfWaAfNTbbroCzTbtxmOCjW63/hd3plmGX9shXwBASzj380LEytlNQhQqL8FyIP+o 58/g7BcCxW0w3x6aCnrIwiI66YmAnvrG0b6fyVMeG//0tDYhvSVyYMmnNMx9KOIuXyR11nQvX i1suokqhATPguhtOomIFqaZqCu7jZoaqQOP+EePb8asl5Qd5kRd2korwj0N7CfQNXOUCoLyos bjCZxQKfWNUfwXQ+Bck+0v7sKPqlLUkAcAq1Q5Y4tff+oMXYoP5Rir+GYQgaFL7yo0syqph/D ALMmE42vM0H91z/jyGg7IT/9Qg3ZDGN8YKp4f6KWBX0E8O9kKL8gXPhUh/ICFvLJ2si91uPTr lLvHW1rgIfwUUMzXBV+/1aTS7V+6Wbg8yojQgOSCCUgy1J4/Wwo5EJmaZM8OmN37Qgczx91ce /x784xRBCdr+79Q1BbsII5mYMspk/Dg1MFHIAlQlVwjhluwez/K0IjxBdBcqoGsFYaBR/qrV6 M9H++PXzVLlMgC/g1GM32pzdKkbK1LsOHgl2Y8fCQj+qMQJ0j0= 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: Sun, 3 Sep 2017 17:47:41 +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/saa7164/saa7164-buffer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/pci/saa7164/saa7164-buffer.c b/drivers/media/pci/saa7164/saa7164-buffer.c index a0d2129c6ca9..6bd665ea190d 100644 --- a/drivers/media/pci/saa7164/saa7164-buffer.c +++ b/drivers/media/pci/saa7164/saa7164-buffer.c @@ -102,7 +102,5 @@ struct saa7164_buffer *saa7164_buffer_alloc(struct saa7164_port *port, - if (!buf) { - log_warn("%s() SAA_ERR_NO_RESOURCES\n", __func__); + if (!buf) goto ret; - } buf->idx = -1; buf->port = port;