Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp327568pxu; Wed, 14 Oct 2020 02:21:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRzsNNKyxZCNwOflz6Ez1gU3NjocVsV0aewQobIaa0pMtKNJt4xquG0kAOLfyjXKVFwOV7 X-Received: by 2002:a05:6402:17a6:: with SMTP id j6mr4087823edy.322.1602667290637; Wed, 14 Oct 2020 02:21:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602667290; cv=none; d=google.com; s=arc-20160816; b=Yn692XZKoUwWtdv5/gzT28c7XZigHBmHtfoC6A+vlbXwNliyarPAkCoFR32BxUouIy Hkeh/jxKkPqY/E8H7S2b4FqCdomyN6//gyLdPx2WIqkFarZBe4R6Ea8phw/ZxDy1RxnX EK4GCK91wyGJ3/BcDwR34pcGofoNLkOPeSJvkigjH97yA3WFZwDz2ppV8aP9QQ3wzoGC 5ujCiBzAFMgnjvX0Ma87a19OFbel+66AqSuPbWO9HRtS/v3f7XChTtodo7e9xOKzaKqc NMTaKOCR7JHL371nWXQp1O2Eb2ZrdTvD+4RF1GL9xfFO7EMhEK4AdtIlGOHikt7Sa33a CVZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=VZWSNn5olapi7jyvwHX5TpcSI1/i+FHeSrlrV+wxQZM=; b=l3crpAN7OpRoQPqc8aqZCw9c2ZId4pPibg6Q+4xFxL4Xkw37las2M1M6HCDlzJyueg ZuxxiPRk7MhHS2hOZ5fkOyQCY/EU6FzSPZ41VofeGfNCAS8MzIKTohQglBYl4etcPMyk BKG6mKaWipnV4KGTFRJ1eie5FupaP0xZKTlROmf2vUhYXPFKWahvbWYka5P8vNJ897cG OOez2Gxpqutp60nCUjwDMHnOGJFJG9ZPS1ASAtZeFA07TvknneFz30HnosCr0YY2BwYc AAKpP8t5YcfPMEbCIzNYcihf8odXkaBGDAKNZalBmclDwogE1r2I9CbwDGYS+mudhIe8 tpjw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cd12si1813373ejb.745.2020.10.14.02.21.07; Wed, 14 Oct 2020 02:21:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729984AbgJNIte (ORCPT + 99 others); Wed, 14 Oct 2020 04:49:34 -0400 Received: from smtp25.cstnet.cn ([159.226.251.25]:46790 "EHLO cstnet.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726147AbgJNIte (ORCPT ); Wed, 14 Oct 2020 04:49:34 -0400 Received: from localhost.localdomain (unknown [124.16.141.241]) by APP-05 (Coremail) with SMTP id zQCowACHjo6Su4ZfalFxAg--.31249S2; Wed, 14 Oct 2020 16:49:24 +0800 (CST) From: Xu Wang To: b.zolnierkie@samsung.com, pakki001@umn.edu, yuehaibing@huawei.com Cc: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] omapfb/dss: Remove redundant null check before clk_prepare_enable/clk_disable_unprepare Date: Wed, 14 Oct 2020 08:49:20 +0000 Message-Id: <20201014084920.25813-1-vulab@iscas.ac.cn> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: zQCowACHjo6Su4ZfalFxAg--.31249S2 X-Coremail-Antispam: 1UD129KBjvdXoWrZFy8CFyfJFWDAr15Kry3J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ZhgAAsv Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Because clk_prepare_enable() and clk_disable_unprepare() already checked NULL clock parameter, so the additional checks are unnecessary, just remove them. Signed-off-by: Xu Wang --- drivers/video/fbdev/omap2/omapfb/dss/venc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/dss/venc.c b/drivers/video/fbdev/omap2/omapfb/dss/venc.c index 0b0ad20afd63..8895fb8493d8 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/venc.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/venc.c @@ -890,8 +890,7 @@ static int venc_remove(struct platform_device *pdev) static int venc_runtime_suspend(struct device *dev) { - if (venc.tv_dac_clk) - clk_disable_unprepare(venc.tv_dac_clk); + clk_disable_unprepare(venc.tv_dac_clk); dispc_runtime_put(); @@ -906,8 +905,7 @@ static int venc_runtime_resume(struct device *dev) if (r < 0) return r; - if (venc.tv_dac_clk) - clk_prepare_enable(venc.tv_dac_clk); + clk_prepare_enable(venc.tv_dac_clk); return 0; } -- 2.17.1