Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4392526pxk; Wed, 30 Sep 2020 01:26:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzr0+MC3ATu5tU5BvZ47mw6/vl+PBxpZ9QjcvbLT2DDHx9XN6fz93KJ2Tw57CYCH+YE7ipo X-Received: by 2002:a17:906:4f16:: with SMTP id t22mr1657330eju.40.1601454377926; Wed, 30 Sep 2020 01:26:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601454377; cv=none; d=google.com; s=arc-20160816; b=sA7HGKbybz+qqdRxFYKhSOuF+mVWnOVFkExCXQY68x3rr92YlOebMP3Bsk+iofHZ+l KvKvgJahP25cLFzGOjyP/m3l7e6/r7yIGve1YHme+9AeVvgXGVBfcFej73aQdk9Z5btt z56DU2umdbpGC8VCFPfhOyMQLTn7xZZSyyVOE7GbHAOxWgmoW/JrErOzDwy9P2hWFNoQ dNZJAk21X6xzBlpjtXecLfzr0aiHApDxITFh6l0nnhoxayLsU7fD8ZBsOqTQSmSY3oWz PsTIKIZ3ng9a+nZ7uh35Uwo2LZCFq76npUC05hWn4J5YvHBGm+++T3EfPJcB73EuHb1I HkxA== 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=EakdRuXXBKGWG88DVbTYRj2Ow9UuLRf6dvQgbAvk9mU=; b=sRkNtUrLQvMXV8MNnkMVhSTrXF9Ym08WTjIPk7IaZx+Jsb/2wIHng59oa1PVn05oMs 1S4BWYtuwmYGaIJ4ZBi4XCKuIslH/r8N1DO07ujvNS6lDJPeew4bCGuuV2iWbcMULuMN EqAHPUTDDYNpF3tMZ8624dVXaryi+W5zdFX54phKD/GxlWcFBl2YngMwrqvUcjUxd6Uo cZ+Zhg5w7QDpY/a3njlRUgeJUPCNYyu3mw9A/Yq43esuf9xja+Jvp6NuDWq93VJv5Bly aPXHP1nwr/ywhVUdoxT6/zDBKvfQbQYLhfOij5T69XoAAwh4q3q1nZTN26KughahBB+y 4Iag== 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 f6si557660edj.365.2020.09.30.01.25.54; Wed, 30 Sep 2020 01:26:17 -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 S1728257AbgI3IYz (ORCPT + 99 others); Wed, 30 Sep 2020 04:24:55 -0400 Received: from smtp23.cstnet.cn ([159.226.251.23]:35538 "EHLO cstnet.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725776AbgI3IYz (ORCPT ); Wed, 30 Sep 2020 04:24:55 -0400 Received: from localhost.localdomain (unknown [159.226.5.100]) by APP-03 (Coremail) with SMTP id rQCowACnrVXMQHRftxmjAA--.49057S2; Wed, 30 Sep 2020 16:24:45 +0800 (CST) From: Xu Wang To: paul@crapouillou.net, airlied@linux.ie, daniel@ffwll.ch Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/ingenic: remove redundant null check Date: Wed, 30 Sep 2020 08:24:41 +0000 Message-Id: <20200930082441.52621-1-vulab@iscas.ac.cn> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: rQCowACnrVXMQHRftxmjAA--.49057S2 X-Coremail-Antispam: 1UD129KBjvJXoW7JF4UZF47GFy5Wry3ZFy8Grg_yoW8Jr4Upa y7JrWFkan7ZF4j9F98Ja9rG3W5ta17WFyI9F15G3ZrKFn8AFyvvFyFy347ZFn0yr1xCF43 JwnrCFy8uF40kFJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUkIb7Iv0xC_Kw4lb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I2 0VC2zVCF04k26cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rw A2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Ar0_tr1l84ACjcxK6xII jxv20xvEc7CjxVAFwI0_Cr0_Gr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I 8E87Iv6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI 64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1Y6r17McIj6I8E87Iv67AKxVW8JVWxJw Am72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lc2xSY4AK67AK6r43MxAIw28I cxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2 IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI 42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42 IY6xAIw20EY4v20xvaj40_Wr1j6rW3Jr1lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2 z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7IU5RrW7UUUUU== X-Originating-IP: [159.226.5.100] X-CM-SenderInfo: pyxotu46lvutnvoduhdfq/1tbiCQQPA102Zm8Z1gAAss Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Because clk_disable_unprepare already checked NULL clock parameter, so the additional checks are unnecessary, just remove them. Signed-off-by: Xu Wang --- drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c index b7074161ccf0..9dce02e779ad 100644 --- a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c +++ b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c @@ -932,8 +932,7 @@ static int ingenic_drm_bind(struct device *dev, bool has_components) return 0; err_devclk_disable: - if (priv->lcd_clk) - clk_disable_unprepare(priv->lcd_clk); + clk_disable_unprepare(priv->lcd_clk); err_pixclk_disable: clk_disable_unprepare(priv->pix_clk); return ret; @@ -953,8 +952,7 @@ static void ingenic_drm_unbind(struct device *dev) { struct ingenic_drm *priv = dev_get_drvdata(dev); - if (priv->lcd_clk) - clk_disable_unprepare(priv->lcd_clk); + clk_disable_unprepare(priv->lcd_clk); clk_disable_unprepare(priv->pix_clk); drm_dev_unregister(&priv->drm); -- 2.17.1