Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1173627pxu; Fri, 27 Nov 2020 01:13:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJy0LykGtirhpXsUtpNmAnbpHQ1UFdHrZc+EqEE+VfWLjMMzmJ+R8IQXvQJiXNMt68NYz9SB X-Received: by 2002:a17:906:4704:: with SMTP id y4mr6487067ejq.449.1606468437067; Fri, 27 Nov 2020 01:13:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606468437; cv=none; d=google.com; s=arc-20160816; b=nUAmxnXmAW24gTnv9F1IovIMLNl/WhTNdWyI9qx8lxlSkSInb3Ioh1GwrfWReLW7UA Gcuw/q8xoi1C2lsQ2uFslZA5ZdZOkLWzXW6tXqiP+arJHrKqLirG68x+HDEid6A/Zrln Hzi1V1S5cbYyMOkYnvqdFtthMYzodScdXLvYQDW1GRPioReE9I80FeYP8p5H7A7oVbD8 pYVoDdB0Zm2gIVnXvSOWS2dd6UV6BTsYVtH79ohqDcxUZpyXmFz/fbp/q6DC4aoZ4GYS V/VoD2vd9bsWbXCRIk/zna7Tkh7jN5jAHBagXUmNLX3yVRTL9MaxTCSOLFudqkHsbPvy xiPA== 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=oviamNukcnkgHWZtJ/F4k1kC9ACWqHJrk/qIKTB0MtY=; b=aM/aRGV8ccY26t4eSn3GxlzbD/zB7ea5jPgBFHWmH7PpxE7HDrLxQehBfoApHclM2P coW1n16aTkZoHI8Omi46d0HwQImOTAPsK/QtsC4irAGC461s8aVVSDIL0LRA7bDpBenh ILo5R7qFDr4TdAJm2rA8HrQUnkYdCwaOp9I60dik+c+lvpnth746uqlo4lk5C7jvCZYL mbLHuANG11oKR4lszYbdDEUbF8Kg+E0LV0kH+bvO/DW6YtTSOv83/oGuRPSt6/iFRxVn W16Cc9vKMcIAymlWWL5uZlXa2mslXXByJQ0qqoDXr04g+AyuPDpDQFSyVpv3a/xVznuV bXew== 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 v9si4642776edb.48.2020.11.27.01.13.33; Fri, 27 Nov 2020 01:13:57 -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 S1726127AbgK0JLN (ORCPT + 99 others); Fri, 27 Nov 2020 04:11:13 -0500 Received: from smtp25.cstnet.cn ([159.226.251.25]:36598 "EHLO cstnet.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725616AbgK0JLN (ORCPT ); Fri, 27 Nov 2020 04:11:13 -0500 Received: from localhost.localdomain (unknown [124.16.141.242]) by APP-05 (Coremail) with SMTP id zQCowADXcgijwsBfZGEQAA--.27270S2; Fri, 27 Nov 2020 17:10:59 +0800 (CST) From: Xu Wang To: linux@armlinux.org.uk, airlied@linux.ie, daniel@ffwll.ch Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/armada: Remove redundant null check before clk_disable_unprepare Date: Fri, 27 Nov 2020 09:10:56 +0000 Message-Id: <20201127091056.50451-1-vulab@iscas.ac.cn> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: zQCowADXcgijwsBfZGEQAA--.27270S2 X-Coremail-Antispam: 1UD129KBjvdXoWrZFy8CFy8AFyDXw18GFykKrg_yoWfZrbEkF 48Jrs7Wr1avFZ29w1j9wsrC340kFWDZan5Jr18taySkrykKr43u3sFvr4rAr1UXa1IkFyf A3WUGFy5ArnrujkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb2kYjsxI4VWkCwAYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I 6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM2 8CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVW5JVW7JwA2z4x0Y4vE2Ix0 cI8IcVCY1x0267AKxVWxJVW8Jr1l84ACjcxK6I8E87Iv67AKxVWxJr0_GcWl84ACjcxK6I 8E87Iv6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI 64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r106r15McIj6I8E87Iv67AKxVW8JVWxJw Am72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lc2xSY4AK67AK6r4fMxAIw28I cxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2 IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI 42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42 IY6xAIw20EY4v20xvaj40_Wr1j6rW3Jr1lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2 z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7IU0nXo5UUUUU== X-Originating-IP: [124.16.141.242] X-CM-SenderInfo: pyxotu46lvutnvoduhdfq/1tbiCwoNA1z4jnGGMwAAsh Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Because clk_disable_unprepare() already checked NULL clock parameter, so the additional check is unnecessary, just remove it. Signed-off-by: Xu Wang --- drivers/gpu/drm/armada/armada_510.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/armada/armada_510.c b/drivers/gpu/drm/armada/armada_510.c index 93d5c0a2d49a..05fe97900b13 100644 --- a/drivers/gpu/drm/armada/armada_510.c +++ b/drivers/gpu/drm/armada/armada_510.c @@ -132,10 +132,8 @@ static int armada510_crtc_compute_clock(struct armada_crtc *dcrtc, static void armada510_crtc_disable(struct armada_crtc *dcrtc) { - if (dcrtc->clk) { - clk_disable_unprepare(dcrtc->clk); - dcrtc->clk = NULL; - } + clk_disable_unprepare(dcrtc->clk); + dcrtc->clk = NULL; } static void armada510_crtc_enable(struct armada_crtc *dcrtc, -- 2.17.1