From patchwork Fri May 4 18:24:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 10381279 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 18AE360546 for ; Fri, 4 May 2018 18:45:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A9A829586 for ; Fri, 4 May 2018 18:45:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F1AF129581; Fri, 4 May 2018 18:45:01 +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=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham 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 D5AD629586 for ; Fri, 4 May 2018 18:44:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751794AbeEDSYr (ORCPT ); Fri, 4 May 2018 14:24:47 -0400 Received: from osg.samsung.com ([64.30.133.232]:51769 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751508AbeEDSYq (ORCPT ); Fri, 4 May 2018 14:24:46 -0400 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id 1DE211F687; Fri, 4 May 2018 11:24:46 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at dev.s-opensource.com Received: from osg.samsung.com ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id psfqgwngsaG7; Fri, 4 May 2018 11:24:45 -0700 (PDT) Received: from smtp.s-opensource.com (177.17.129.114.dynamic.adsl.gvt.net.br [177.17.129.114]) by osg.samsung.com (Postfix) with ESMTPSA id 08F7F1F681; Fri, 4 May 2018 11:24:45 -0700 (PDT) Received: from mchehab by smtp.s-opensource.com with local (Exim 4.90_1) (envelope-from ) id 1fEfNq-0005RM-CK; Fri, 04 May 2018 14:24:42 -0400 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab , Akihiro Tsukada Subject: [PATCH] media: pt3: no need to check if null for dvb_module_release() Date: Fri, 4 May 2018 14:24:41 -0400 Message-Id: <59a8914011a01e71ae93789f2fca7bea35dc0b60.1525458277.git.mchehab+samsung@kernel.org> X-Mailer: git-send-email 2.17.0 To: unlisted-recipients:; (no To-header on input) 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 Such check is already there at the routine. So, no need to repeat it outside. Cc: Akihiro Tsukada Signed-off-by: Mauro Carvalho Chehab --- drivers/media/pci/pt3/pt3.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/media/pci/pt3/pt3.c b/drivers/media/pci/pt3/pt3.c index b2d9fb976c9a..cbec5c42fcbc 100644 --- a/drivers/media/pci/pt3/pt3.c +++ b/drivers/media/pci/pt3/pt3.c @@ -619,10 +619,8 @@ static void pt3_cleanup_adapter(struct pt3_board *pt3, int index) adap->fe->callback = NULL; if (adap->fe->frontend_priv) dvb_unregister_frontend(adap->fe); - if (adap->i2c_tuner) - dvb_module_release(adap->i2c_tuner); - if (adap->i2c_demod) - dvb_module_release(adap->i2c_demod); + dvb_module_release(adap->i2c_tuner); + dvb_module_release(adap->i2c_demod); } pt3_free_dmabuf(adap); dvb_dmxdev_release(&adap->dmxdev);