From patchwork Mon Dec 1 22:33:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 5415631 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 12B349F1CD for ; Mon, 1 Dec 2014 22:34:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4531220270 for ; Mon, 1 Dec 2014 22:34:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6F06B200EC for ; Mon, 1 Dec 2014 22:34:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932619AbaLAWeU (ORCPT ); Mon, 1 Dec 2014 17:34:20 -0500 Received: from mout.web.de ([212.227.17.11]:62101 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932518AbaLAWeJ (ORCPT ); Mon, 1 Dec 2014 17:34:09 -0500 Received: from [192.168.1.2] ([78.48.162.200]) by smtp.web.de (mrweb101) with ESMTPSA (Nemesis) id 0MLxo0-1XnsR93Gf6-007oXV; Mon, 01 Dec 2014 23:33:52 +0100 Message-ID: <547CECC9.1080508@users.sourceforge.net> Date: Mon, 01 Dec 2014 23:33:45 +0100 From: SF Markus Elfring User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.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] mn88473: 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> <547CEBF5.4040004@users.sourceforge.net> In-Reply-To: <547CEBF5.4040004@users.sourceforge.net> X-Provags-ID: V03:K0:P5BtDMHHIJGGL1DQEzkNaI5+WAFHqC8m66SXRRphVW6Obcthjgo KtLD5nceufLxNdSn5TcmFIhoLEDQTRnM/BYC35AaId5w4NoBAjGOAGUtiO9w43WWEm/PAL6 hB3P6A1qnAzm5ekC2T8vcdQsXHPYB5wvQyHivnm2FkXuTJrX6AG5jjJaiYFY+qdY026RRPV ctDXwOwOAULHnYuEgpG3Q== 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: Mon, 1 Dec 2014 22:55:29 +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/mn88473/mn88473.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/media/mn88473/mn88473.c b/drivers/staging/media/mn88473/mn88473.c index 1659335..52180bb 100644 --- a/drivers/staging/media/mn88473/mn88473.c +++ b/drivers/staging/media/mn88473/mn88473.c @@ -262,8 +262,7 @@ static int mn88473_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;