From patchwork Thu Aug 31 19:56:44 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: 9932773 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 6ECA260309 for ; Thu, 31 Aug 2017 19:57:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 63C6628A32 for ; Thu, 31 Aug 2017 19:57:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 58AEE28A37; Thu, 31 Aug 2017 19:57:06 +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 2338A28A32 for ; Thu, 31 Aug 2017 19:57:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751737AbdHaT4x (ORCPT ); Thu, 31 Aug 2017 15:56:53 -0400 Received: from mout.web.de ([217.72.192.78]:62296 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751725AbdHaT4v (ORCPT ); Thu, 31 Aug 2017 15:56:51 -0400 Received: from [192.168.1.2] ([77.181.81.131]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MN4Kq-1dpiUw1ghE-006eFW; Thu, 31 Aug 2017 21:56:46 +0200 Subject: [PATCH 1/3] [media] mb86a20s: Delete an error message for a failed memory allocation in mb86a20s_attach() From: SF Markus Elfring To: linux-media@vger.kernel.org, Mauro Carvalho Chehab , Max Kellermann , Nicolas Iooss Cc: LKML , kernel-janitors@vger.kernel.org References: <9571ee6c-5137-15f4-4cdb-9f03b5cb9268@users.sourceforge.net> Message-ID: Date: Thu, 31 Aug 2017 21:56:44 +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: <9571ee6c-5137-15f4-4cdb-9f03b5cb9268@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:HA5ZKCBVUJz3Rcq1++PD3Wv8omnAdt8BqoS2rS8lIhAxvvjfrB0 7ovUdPaltrUdGa2PGpgOK/yO7dWM9tar6q/JJSJLeK5iH+3c7nsZ9aCSzof3M815lpIxjyt 7JKlj0ELlFXaAde3wb+DI0FiftCZiCwxhZetkprreYahtZR6B74roavndgoIDolA9RUnQAv v3h0tjZZNrzvoHvOjbZug== X-UI-Out-Filterresults: notjunk:1; V01:K0:L0bfaeAggB4=:aa4iEme5YIqgLERgr2x1ma o19hBPINtsDHdYveLF1ovVUbIHKwNhEoN+0TaE9Pp3Pich+XJL4LbpHDA40yIKZ6tuS+9zaKa MnCsov4HQW9X8Upmgxm+cxuEAtQgcd7hhoYGCFzCyFP5Yer5ir29OkNukOLaBXr7r4/6D1bZ+ woPETfJuqMPF5iCsqvydnJZzjpn0g9PCgKJ985FwEyXWlYDvOwyuWmN4hgYW0hjb6rrGXFbHx z48BvV782IooE8mZLfm4WXX4HfoWAhDVrIJnVJjJNDLax3O4W5Lk2YkWBO3oXM2wi360dfxIu SyWH2UISc1niHa/twbv9TWY9WQQm1MRnAEL4nhuGF1EEaaOrmsRZX8tcfPVC4bLtzYvcsMjm7 Ou7GyqIUbA8y3f5axUfqQ4HmnVP2S2E3p7zHb6NHtfv6HLdKPpgvhvZyXVrZik6x19nzqTrVm J9SKJGTe4GW2uIJwATaA+v+0kGuejob93RbQ8gKR1NrZPi7QsOD345P1fscaXeicrvTYOm5N5 idYH4X42603rQApxVKYlBi/IT+26r6n3TVjIkNpPoNHyygzJAQyme3JyLB/2qLnBhOWdlaTqC pm8i0ef4ytWYy+7FxeY+WWlRqdoo2/tmYOZuWE1BtO/kKHAbnis9cDpC2HFCeirFV+b+nV3wd EC8PJA2bnBjhYGHa3fREBzOHWTQLVGJJW2xdZ/MITtgCAhZAw/buQv4VuEsjFZo0Q6wxkOJk/ s4E5b4Bzg9ECk8pdYwHvEglr3pUjbQYbSySnaAwqjJ46BB3Otu6lcPgzASQEyzYTWQOnwagcD jB7bi94c758j4WRYKxVrL9WkJq6Or0j0kO4323ZQkwne3xhO+E= 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: Thu, 31 Aug 2017 21:10:25 +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/mb86a20s.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/media/dvb-frontends/mb86a20s.c b/drivers/media/dvb-frontends/mb86a20s.c index e8ac8c3e2ec0..340984100aec 100644 --- a/drivers/media/dvb-frontends/mb86a20s.c +++ b/drivers/media/dvb-frontends/mb86a20s.c @@ -2075,8 +2075,5 @@ struct dvb_frontend *mb86a20s_attach(const struct mb86a20s_config *config, - if (state == NULL) { - dev_err(&i2c->dev, - "%s: unable to allocate memory for state\n", __func__); + if (!state) goto error; - } /* setup the state */ state->config = config;