From patchwork Tue Aug 29 19:44: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: 9928177 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 C9792602B9 for ; Tue, 29 Aug 2017 19:45:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BCE3728A4D for ; Tue, 29 Aug 2017 19:45:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B158E28A51; Tue, 29 Aug 2017 19:45:05 +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 CC7E128A4D for ; Tue, 29 Aug 2017 19:45:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751867AbdH2Tos (ORCPT ); Tue, 29 Aug 2017 15:44:48 -0400 Received: from mout.web.de ([212.227.15.14]:53465 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751227AbdH2Toq (ORCPT ); Tue, 29 Aug 2017 15:44:46 -0400 Received: from [192.168.1.2] ([77.181.80.150]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MDByG-1djXJF0Miy-00Gbv3; Tue, 29 Aug 2017 21:44:41 +0200 Subject: [PATCH 1/2] [media] as102_fe: Delete an error message for a failed memory allocation in as102_attach() From: SF Markus Elfring To: linux-media@vger.kernel.org, Mauro Carvalho Chehab , Max Kellermann Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: <9c0645bc-181a-4f34-49b7-8de4150b1555@users.sourceforge.net> Date: Tue, 29 Aug 2017 21:44:40 +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: Content-Language: en-GB X-Provags-ID: V03:K0:Cxgo5MhPuopcKwivHPTzliuCQEbJ4Fzh7fbQPTVnvr7sisnGr43 EAeHGk+9vHdNaudDybqIfqtVhOXwFX0KC145d2LMNIwUtTm8cLds29PRwcVADjPY9d+YlHE /OtoEMVBZm9VgU6mYPArTS0dJNAQqyCmsaZLTSH4UvlvQo8X1R73BLAG40PTdTOUh/qCmQe woHYl8Z36H1IZwuUpQAcA== X-UI-Out-Filterresults: notjunk:1; V01:K0:xhgAtpRmcA8=:WFZ4dMbXrjj2VOKXbapgcO huzDjaS/sZ/PficaXYa9VqsWJl+qCodZTo0NSTXdflMfvFbzdHx4cx95oi/EyTgzIWaDBBZeh aTF0tAk6L+eOm1zJZ0ihNC43TAeThq4i6NtoCa1aB6ZDo68nUJFRZgxCgn6ee0a6Dxa6TtMHu EL7EyxlCS2RAzzmaLpSCuSx21I6v7loWvhNn43R+Kb8hPf4tvSC1PidASatAkoiZZGhKL5h9Z XFj4TStd1MR05X8YKTfy7FlQnb0ZmVSxh45W85LODQC+pe7pyGRtMPQeCnQMuBYuaffloTFbE C81HxJ5R6SlqpJ+PRt2JCztUvoQM8BXPYhtu2MbescIR2XydRvMHpAr/lU6w4i7Qu22a+WNjH Ne0PXOApxDyZBUf+uUkEZhn+eCFH2WHKVb3HtVUwXpLhLXBIiN+at2j4aW9E8V4joWHqejYfT dQN7lNeOByVu6yXvlzgIsGH5fRhZdEsSpmvVlsVhO8FLAz+zR5Y1J76yMXlXCl4X2S6fbmsPj r3LyOVDFE/i626bNg3CaPocY9y+JZKfn4EQOaJCuBiE3xV7F751h41iiYEVHBuEYzBOsc57aw hqIpsIFVTDrkFp0q2LViDaCB2vP7RalPGqKXyEPjZU3ul/wqWkXEJTeEC7jILaW7a4NyLwEEn c1t4cXl8SnbmsHzyQltI2V3vkSH5LSMJj1nVIaANwBckEvbNEHIukFBoeFoJ5XC7hO3B5Kv6o WA+4i2ZpPDkdWRuRJh7PkEFWN2Pmb2lXdhCHZ0P0Ct0QG3nqCJlTgvtZOuKXSDuH9fPp4duKG UwnjJuDd9VAMmZVaWxtEcpHjByJ/lBMiGhjstdUNKfLEb/tCZk= 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 21:26:12 +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/dvb-frontends/as102_fe.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/dvb-frontends/as102_fe.c b/drivers/media/dvb-frontends/as102_fe.c index 98d575f2744c..1fb4ab21d786 100644 --- a/drivers/media/dvb-frontends/as102_fe.c +++ b/drivers/media/dvb-frontends/as102_fe.c @@ -459,7 +459,6 @@ struct dvb_frontend *as102_attach(const char *name, - if (state == NULL) { - pr_err("%s: unable to allocate memory for state\n", __func__); + if (!state) return NULL; - } + fe = &state->frontend; fe->demodulator_priv = state; state->ops = ops;