From patchwork Fri Dec 4 08:51:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Wang X-Patchwork-Id: 11951111 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C2E2C433FE for ; Fri, 4 Dec 2020 08:53:38 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C0985227BF for ; Fri, 4 Dec 2020 08:53:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C0985227BF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=iscas.ac.cn Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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:In-Reply-To:References:List-Owner; bh=UYPpzESlhDTHdSbT+G+DYyt3ISqzXNVMNSk0FUrU/V0=; b=dlnC7YrpJiZwmJc7IeR2D9LaNv WY7hEwWDY0Uy139RuQO8oGsoo0vqRax8pJdAfs/yFeO9c1MbC49GGOivlnu/Bw7TKhj7VHX2GENy1 loKjHw0wdwVeYyTD8SiHa++bgUZl+HR0b8XLIuHwWfzfzU8R0SkLsj3X+3YFpsfXbiqekAJohdWEd NspimkadB9Ec/KlzVkvhXitKCG4ICPEa+PfH6mGyOfT4zthcFpNkBcbRYCuF22Z2LzVYvgiR4BFxG 1tV3TtoojScpuktL4N9mkCBlibTWCjpjbkkCT5wZ2RfHKzY5zMASgZ8IhiEUo2bknOGQ0qQn8YH71 BOh3cf2A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kl6p9-0001lD-2S; Fri, 04 Dec 2020 08:52:19 +0000 Received: from smtp21.cstnet.cn ([159.226.251.21] helo=cstnet.cn) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kl6p6-0001km-0D for linux-arm-kernel@lists.infradead.org; Fri, 04 Dec 2020 08:52:17 +0000 Received: from localhost.localdomain (unknown [124.16.141.242]) by APP-01 (Coremail) with SMTP id qwCowACXn0+q+MlfGBnaAA--.27966S2; Fri, 04 Dec 2020 16:51:55 +0800 (CST) From: Xu Wang To: balbi@kernel.org, gregkh@linuxfoundation.org, joel@jms.id.au, andrew@aj.id.au, rentao.bupt@gmail.com, benh@kernel.crashing.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org Subject: [PATCH] usb: gadget: aspeed: Remove redundant null check before clk_disable_unprepare Date: Fri, 4 Dec 2020 08:51:50 +0000 Message-Id: <20201204085150.3063-1-vulab@iscas.ac.cn> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: qwCowACXn0+q+MlfGBnaAA--.27966S2 X-Coremail-Antispam: 1UD129KBjvdXo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oduhdfq/1tbiCQoAA102ZxEfFgAAsU X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201204_035216_529382_96CFD76F X-CRM114-Status: GOOD ( 10.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Because clk_disable_unprepare() already checked NULL clock parameter, so the additional check is unnecessary, just remove it. Signed-off-by: Xu Wang Reviewed-by: Andrew Jeffery --- drivers/usb/gadget/udc/aspeed-vhub/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/gadget/udc/aspeed-vhub/core.c b/drivers/usb/gadget/udc/aspeed-vhub/core.c index be7bb64e3594..ea47f4b98de9 100644 --- a/drivers/usb/gadget/udc/aspeed-vhub/core.c +++ b/drivers/usb/gadget/udc/aspeed-vhub/core.c @@ -282,8 +282,7 @@ static int ast_vhub_remove(struct platform_device *pdev) VHUB_CTRL_PHY_RESET_DIS, vhub->regs + AST_VHUB_CTRL); - if (vhub->clk) - clk_disable_unprepare(vhub->clk); + clk_disable_unprepare(vhub->clk); spin_unlock_irqrestore(&vhub->lock, flags);