From patchwork Tue Aug 29 20:31:23 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: 9928249 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 AAB626022E for ; Tue, 29 Aug 2017 20:31:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D8E728A58 for ; Tue, 29 Aug 2017 20:31:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 928CE28A5E; Tue, 29 Aug 2017 20:31:46 +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 5D7E528A58 for ; Tue, 29 Aug 2017 20:31:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751732AbdH2Ubd (ORCPT ); Tue, 29 Aug 2017 16:31:33 -0400 Received: from mout.web.de ([212.227.15.4]:54202 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751270AbdH2Ubc (ORCPT ); Tue, 29 Aug 2017 16:31:32 -0400 Received: from [192.168.1.2] ([77.181.80.150]) by smtp.web.de (mrweb001 [213.165.67.108]) with ESMTPSA (Nemesis) id 0M4Zlk-1daUXQ2ZDw-00yg1W; Tue, 29 Aug 2017 22:31:24 +0200 Subject: [PATCH 1/3] [media] cx24113: Delete an error message for a failed memory allocation in cx24113_attach() From: SF Markus Elfring To: linux-media@vger.kernel.org, Mauro Carvalho Chehab , Max Kellermann , Sakari Ailus Cc: LKML , kernel-janitors@vger.kernel.org References: <36a5402f-c7a2-edf0-1af8-b98b0684d8e5@users.sourceforge.net> Message-ID: <8273a111-9edf-7079-fc6a-ea674b06f43a@users.sourceforge.net> Date: Tue, 29 Aug 2017 22:31:23 +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: <36a5402f-c7a2-edf0-1af8-b98b0684d8e5@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:Lm3ctPJZICpRWy+gvtHjrtz+03EdD4ybyFODrP/JTsUzgsvHYHi Iaas5cd7CXOjz+Q/X6Z9YnGXLhIjwoKLWLchO5RuKuR4m9Ed79rHVOq/V/ovy+MIQ9hXlFW +pV1WTwyniUeUBJzqB3f4Iu/fE6N9dMHvcLO36iXXctTKsxpmCr2qSExvpnEtYGACkJnd7p t+pB56YskMhS7tyUlX0aQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:S9Mdw7mh7UU=:Y39aHpK0cb9l+Uo10P5jrj cdNDaG+r89OcL9iZyZP2xuLB4XVHF72ajkvfRyJC7QhLWdIhsYkbKjb57uxE625uvtd2iOn3l 7of2eKpHIKLKk4FzdJJ71MqK8Fm7C7IELwSOG0R5kIxETLM3vKYQBBAtCKaD9GbVismYrpGwC 6v+KEeQ4YumQx6pguUuSkRP1fFfhYqtmFnlmvsuNvZ8lUWG0uchhSTxbOySF/FudTkRneIv2Z 0csHiFTWugxbB19iO064NuKXqWsQphV3R3ppXW/154KJ732s0Ynn0KJByrAuJs8IkCoZZqw9y NI+LvE2aGP9fJjDcZr1WrsHM+BdCuCiiB6VZU2VMemNUov7kmlMR4GY2uSoHD8uZ53hPT5Rxy 5C66sm9Qz/5KcHYl/eaWwdcE/u7oDTX82gEOUJ9XMB6cRv6AiuD701m+MydXN9lAvdJUNZOZf gr1HBfiL8W2VVOJlRmC4p0dRsAUCDlsRT2CADnl+iwPq+HV1WErA5lFhy3nb4jt5gbJBPdsNW 3A0jYCXdHIrmjFuB2d+jGsL09ggrbFpmT0fepn5/NY1Vuem8dDmJ9V4cOkndIyiD+ghvjk0RL 9gjrgDR9E8SSvDGOk4RvffDX+vRLbefYzcFdT65wCds/pYEZb/3AmcUDyXHA1V/fQlmESAOie dXwr23yqWZ9d04lwTON2UV2H0gw5m3qJiflZLCQ2J7aCoCqXzX6vpssqcCLQB2j+vJsrds+T6 gV/TxW4U8d95q/DDZOGByK/mWb+3WxAYAJ8sdm5FEHcaCbjmwmDDDO1DE3UA0cKsc1i/sGgz1 1q5E3p7XPrIEaYovAmfa2HUGQLENok2JQ8lAhjoqvzbqzPMEP4= 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 22:08:09 +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/cx24113.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/dvb-frontends/cx24113.c b/drivers/media/dvb-frontends/cx24113.c index 0118c2658cf7..8fc7333c76b7 100644 --- a/drivers/media/dvb-frontends/cx24113.c +++ b/drivers/media/dvb-frontends/cx24113.c @@ -557,8 +557,7 @@ struct dvb_frontend *cx24113_attach(struct dvb_frontend *fe, int rc; - if (state == NULL) { - cx_err("Unable to kzalloc\n"); + + if (!state) goto error; - } /* setup the state */ state->config = config;