From patchwork Sun Feb 1 19:16:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 5757501 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 905D59F269 for ; Sun, 1 Feb 2015 19:16:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DD34E2020E for ; Sun, 1 Feb 2015 19:16:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0F568201F2 for ; Sun, 1 Feb 2015 19:16:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753749AbbBATQN (ORCPT ); Sun, 1 Feb 2015 14:16:13 -0500 Received: from mout.web.de ([212.227.17.11]:59620 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750793AbbBATQM (ORCPT ); Sun, 1 Feb 2015 14:16:12 -0500 Received: from [192.168.1.2] ([92.228.138.179]) by smtp.web.de (mrweb101) with ESMTPSA (Nemesis) id 0McFTf-1XyxPe0Rip-00JY62; Sun, 01 Feb 2015 20:16:05 +0100 Message-ID: <54CE7B71.2030706@users.sourceforge.net> Date: Sun, 01 Feb 2015 20:16:01 +0100 From: SF Markus Elfring User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Antti Palosaari , Greg Kroah-Hartman , Mauro Carvalho Chehab , devel@driverdev.osuosl.org, linux-media@vger.kernel.org CC: LKML , kernel-janitors@vger.kernel.org, Julia Lawall Subject: [PATCH 1/2] [media] mn88472: Deletion of an unnecessary check before the function call "release_firmware" References: <5307CAA2.8060406@users.sourceforge.net> <530A086E.8010901@users.sourceforge.net> <530A72AA.3000601@users.sourceforge.net> <530B5FB6.6010207@users.sourceforge.net> <530C5E18.1020800@users.sourceforge.net> <530CD2C4.4050903@users.sourceforge.net> <530CF8FF.8080600@users.sourceforge.net> <530DD06F.4090703@users.sourceforge.net> <5317A59D.4@users.sourceforge.net> <54CE7A6E.104@users.sourceforge.net> In-Reply-To: <54CE7A6E.104@users.sourceforge.net> X-Provags-ID: V03:K0:V1l3ENE0tzLnPDRB1YiypvdvYSSxaV2dYv3HLMEBEzqWGXrQTrz BxeOlc9bM7ldsVgMmWXAiE0UcKQL7B+DYqSS0j6HsA+6RRPyM7Im0C9Cs5THpSEC7nzi1f6 Zhe6htO/QdkXmrt98NE0Nt6QFDxvqD51lwcrk2lobRphQDFoZW1W9QBlBCJjZPb7hcP4UEf CZUBMGnhfT4XSf+fi9Aag== X-UI-Out-Filterresults: notjunk:1; Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Sun, 1 Feb 2015 19:12:56 +0100 The release_firmware() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/staging/media/mn88472/mn88472.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/media/mn88472/mn88472.c b/drivers/staging/media/mn88472/mn88472.c index 52de8f8..e7874ae 100644 --- a/drivers/staging/media/mn88472/mn88472.c +++ b/drivers/staging/media/mn88472/mn88472.c @@ -315,8 +315,7 @@ static int mn88472_init(struct dvb_frontend *fe) return 0; err: - if (fw) - release_firmware(fw); + release_firmware(fw); dev_dbg(&client->dev, "failed=%d\n", ret); return ret;