From patchwork Wed Feb 14 16:16:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory CLEMENT X-Patchwork-Id: 10219383 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 1A13C601C2 for ; Wed, 14 Feb 2018 16:21:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 04D8528CEE for ; Wed, 14 Feb 2018 16:21:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0365728FF5; Wed, 14 Feb 2018 16:21:32 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 87D7028CEE for ; Wed, 14 Feb 2018 16:21:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=TGEMhDqTl/9DrZlDCwG4/DDeF+az30Iuxq3wag5cTg8=; b=kTc2D1KDuHNN5SPbwC1ViMt9eW kUnA8uEPI1TIMucciCINtiC3O3ofb1pTWxGU6292dxVl7tXtiavyTr9xL51O+As1Hu++qxBatyAly +Fg1tlODORqUPhoCWmKHyNxyPfYrSefcoEPJJMr7r950uww6RH65s1ocMkGGnB/XO3/mAYr77kUOv qq3ELHWTftBMf/UQlTwFS8BWmxcJHxJqFeJCwYj6/k4o7PgsVyjFixzTidtwPUKqRtbI+V/MnFGRA rNEnwe1RO+yYTxQtgz/qf+tBeKbpykAQrYvL5o9zeAwonuf1IlUPJvHaiNC/kc2/HQ95Hnz29sisQ l+J1Fqdg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1elznq-0005j9-E6; Wed, 14 Feb 2018 16:21:02 +0000 Received: from mail.free-electrons.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1elzly-0003E8-92 for linux-arm-kernel@lists.infradead.org; Wed, 14 Feb 2018 16:19:19 +0000 Received: by mail.free-electrons.com (Postfix, from userid 110) id 6E406207E4; Wed, 14 Feb 2018 17:18:52 +0100 (CET) Received: from localhost (242.171.71.37.rev.sfr.net [37.71.171.242]) by mail.free-electrons.com (Postfix) with ESMTPSA id 3F65820389; Wed, 14 Feb 2018 17:18:52 +0100 (CET) From: Gregory CLEMENT To: Greg Kroah-Hartman , Mathias Nyman , linux-usb@vger.kernel.org Subject: [PATCH 1/2] usb: host: xhci-plat: Remove useless test before clk_disable_unprepare Date: Wed, 14 Feb 2018 17:16:19 +0100 Message-Id: <20180214161620.4401-2-gregory.clement@bootlin.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180214161620.4401-1-gregory.clement@bootlin.com> References: <20180214161620.4401-1-gregory.clement@bootlin.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180214_081906_885528_D53C9B3F X-CRM114-Status: GOOD ( 10.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Lunn , Jason Cooper , Antoine Tenart , Gregory CLEMENT , Omri Itach , Nadav Haklai , Shadi Ammouri , Igal Liberman , Thomas Petazzoni , =?UTF-8?q?Miqu=C3=A8l=20Raynal?= , Marcin Wojtas , Hanna Hawa , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP clk_disable_unprepare() already checks that the clock pointer is valid. No need to test it before calling it. Signed-off-by: Gregory CLEMENT --- drivers/usb/host/xhci-plat.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index 6f038306c14d..79afaac57ef6 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -319,8 +319,7 @@ static int xhci_plat_probe(struct platform_device *pdev) usb_put_hcd(xhci->shared_hcd); disable_clk: - if (!IS_ERR(clk)) - clk_disable_unprepare(clk); + clk_disable_unprepare(clk); put_hcd: usb_put_hcd(hcd); @@ -346,8 +345,7 @@ static int xhci_plat_remove(struct platform_device *dev) usb_remove_hcd(hcd); usb_put_hcd(xhci->shared_hcd); - if (!IS_ERR(clk)) - clk_disable_unprepare(clk); + clk_disable_unprepare(clk); usb_put_hcd(hcd); pm_runtime_set_suspended(&dev->dev);