Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1170623pxu; Fri, 27 Nov 2020 01:08:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJxcj5Bw5x8fFHjaEvZW4z9ZY0akRYmvEqSStTR8ziKPevs5/BvxpewyOnCHT57pyvktNGjg X-Received: by 2002:a17:906:7ac7:: with SMTP id k7mr6560419ejo.454.1606468127348; Fri, 27 Nov 2020 01:08:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606468127; cv=none; d=google.com; s=arc-20160816; b=S2HZI0I66d/UwFY/sPpLqA6kKEHEUj2mgVbPMhYwiRJldJsq3M5nulqde1Lkd2XKiQ duIomV20vcavEJd8RjxcXqpLKeZDa7uaJ/yy6J2v66Jtf3zlvHLUSNz6aXcKLItME5MH JOGx8Sgdhg2qMxb7aQSPoTKMiXHdR8NGQPgfdMIbssdsf8KZCMl6Nghsd56MxqnnDl3p 5Xp7SYb1pZBqlyXbkVS6olnXVqoQru+H0nYwkdg28pdRuZAlTB2D/ndccKsiJDzpwjok 676UZT7tt638GwSzsBxATTRHnOl6qxXwi+tmjKPLXrmaJ7orRc0WPmEcSF+eWzPdZ/Hn wwaA== 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=zo2eKtSeMYAy44jd/QPW5tKWX3BzkdfGzqjExFmLUTU=; b=QYlC6+SzECKfnutGY8wp4qLR9xsZYDVDgr5HwOtraNvtW+bV1CX3t1XIUxUELdEFwr 3aclusHR1vgAGcSVct6NY96kBm09wGAWdZDkbDY4OOZTgxAQKbty+NmN4874Rhq84JIU i7WQjlLWw0HpusN/p/BAiROgtjWgbUQoekTYCtV1TiYjeW9+DhzTMKtIueqhh5c4x+aF 7dzNkcn8EkWzqO2hrMz7jLcOzyl4fqSbXHsneNPEy8wDzbFk305ULUKAXpYV9p2HGXz1 sA8VHp58zDyKUEbNOqJ2pw/3qUR0RxElMKTLPJFqZKtug5zaqXo1bRjre1rLNGZEHatI JIyQ== 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 22si4407438ejv.120.2020.11.27.01.08.23; Fri, 27 Nov 2020 01:08:47 -0800 (PST) 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 S1726721AbgK0JGI (ORCPT + 99 others); Fri, 27 Nov 2020 04:06:08 -0500 Received: from smtp25.cstnet.cn ([159.226.251.25]:60690 "EHLO cstnet.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726034AbgK0JGH (ORCPT ); Fri, 27 Nov 2020 04:06:07 -0500 Received: from localhost.localdomain (unknown [124.16.141.242]) by APP-05 (Coremail) with SMTP id zQCowADnx+BxwcBf200QAA--.93S2; Fri, 27 Nov 2020 17:05:54 +0800 (CST) From: Xu Wang To: mturquette@baylibre.com, sboyd@kernel.org, heiko@sntech.de, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH] clk: rockchip: Remove redundant null check before clk_prepare_enable Date: Fri, 27 Nov 2020 09:05:51 +0000 Message-Id: <20201127090551.50254-1-vulab@iscas.ac.cn> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: zQCowADnx+BxwcBf200QAA--.93S2 X-Coremail-Antispam: 1UD129KBjvdXoWrZFy8CFy8AFW5Ww4rWFykZrb_yoW3WFgEka 1Ygr4agr1IqrWayFWUJaykZ39093Z2vr1v93WIvF43Ja47Wr1fuFs2qw4rAa47JFW2kFyS yryUuw47Cr13AjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb28YjsxI4VW3JwAYFVCjjxCrM7AC8VAFwI0_Gr0_Xr1l1xkIjI8I 6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM2 8CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVW5JVW7JwA2z4x0Y4vE2Ix0 cI8IcVCY1x0267AKxVWxJVW8Jr1l84ACjcxK6I8E87Iv67AKxVWxJr0_GcWl84ACjcxK6I 8E87Iv6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI 64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r106r15McIj6I8E87Iv67AKxVW8JVWxJw Am72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lc2xSY4AK67AK6r4fMxAIw28I cxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2 IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI 42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwCI42 IY6xAIw20EY4v20xvaj40_WFyUJVCq3wCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E 87Iv6xkF7I0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x07jwL0nUUUUU= X-Originating-IP: [124.16.141.242] X-CM-SenderInfo: pyxotu46lvutnvoduhdfq/1tbiCgkNA1z4jLOBIgAAs1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Because clk_prepare_enable() already checked NULL clock parameter, so the additional check is unnecessary, just remove it. Signed-off-by: Xu Wang --- drivers/clk/rockchip/clk.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/clk/rockchip/clk.c b/drivers/clk/rockchip/clk.c index b443169dd408..336481bc6cc7 100644 --- a/drivers/clk/rockchip/clk.c +++ b/drivers/clk/rockchip/clk.c @@ -603,8 +603,7 @@ void rockchip_clk_protect_critical(const char *const clocks[], for (i = 0; i < nclocks; i++) { struct clk *clk = __clk_lookup(clocks[i]); - if (clk) - clk_prepare_enable(clk); + clk_prepare_enable(clk); } } EXPORT_SYMBOL_GPL(rockchip_clk_protect_critical); -- 2.17.1