Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp318305pxu; Wed, 14 Oct 2020 02:03:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwojSrYCG3mD8cTQf88w3GhdKfs+P441V2DgwEM14MTO4YECq3BB41LG6q/EjQgmricVUEG X-Received: by 2002:a17:906:684c:: with SMTP id a12mr4164088ejs.406.1602666182624; Wed, 14 Oct 2020 02:03:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602666182; cv=none; d=google.com; s=arc-20160816; b=NDoechhduz/TdA5aR9YiV9WVEmmlM5vxiEw1BfOj0Z2buOS2iOupggPaCiQlJDeP7J gZ+6fS62gvOlpZgq8g46RvhvyYihp97Qz3WjZyd3JRmxpGzQOv20JSBNL0TVM+qc/4Fg nBNoX9+p/VL41VjNV0oQfCIZSAnB07yC870dtuF8TgIs4SGkJk6KNuGfxznGUTs8YpYz yiFtttfmUf+LO+2rZLyXTomyaVfUwidEF5VUNunqbtKzVtWd0wHiTxVD3mCn3AmwFe7L t7gdMlWq7P5J2wL2gcg02pzBlbBsNOxfQAg+2Vo8nuFz9k1mR5tPq9jarVF+r4OoUec0 gdVw== 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=UEvZ/9pe26N/l5cGV0Ds2rnqlLF2sUBlu5TQ5i0x5Uk=; b=OTKZ0aEtRjr0TmB+4+F1H7OXilNWWn+oFIMfYqBX2EDIqe/RAH+HmAAhBezVdsT6dw P4lnlenjcSH7hjUjfOzzLkOKjOckUmkvQdu/REeRdAbcWKKy0HmkU442oxeQjqn/v3tW /YmMrudw9QPeEfp5M+U++w4IuXkbhFrYO4CgvXX4NcVYIDGVo52s5TKPvI0i6U6T0iOA jz9kmjDxaeaRwIlSW9+2F1HsAvX5dpgis7Zswii+mn+VlFN0v82vPHqR8CUAIlC9i2eQ Vo5uG/aVOktbgkW/lZQI4gOEVZZgUz9MaD+sIOOXuDAgwm2uVuZbgWZbOToKrDxKu68i lCtQ== 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 s18si2175860ejd.51.2020.10.14.02.02.39; Wed, 14 Oct 2020 02:03:02 -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 S1727929AbgJNIWN (ORCPT + 99 others); Wed, 14 Oct 2020 04:22:13 -0400 Received: from smtp25.cstnet.cn ([159.226.251.25]:47540 "EHLO cstnet.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726389AbgJNIVt (ORCPT ); Wed, 14 Oct 2020 04:21:49 -0400 Received: from localhost.localdomain (unknown [124.16.141.241]) by APP-05 (Coremail) with SMTP id zQCowAC3l7QTtYZf9qNwAg--.49721S2; Wed, 14 Oct 2020 16:21:41 +0800 (CST) From: Xu Wang To: b.zolnierkie@samsung.com, jani.nikula@intel.com, daniel.vetter@ffwll.ch Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] au1100fb: Remove NULL pointer check before clk_enable/disable Date: Wed, 14 Oct 2020 08:21:37 +0000 Message-Id: <20201014082137.23320-1-vulab@iscas.ac.cn> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: zQCowAC3l7QTtYZf9qNwAg--.49721S2 X-Coremail-Antispam: 1UD129KBjvdXoW7Gw17AFyfXFW5Kr13Aw1xuFg_yoWktFgEv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: linux-kernel@vger.kernel.org Because clk_enable, clk_disable, clk_prepare, and clk_unprepare already checked NULL clock parameter, so the additional checks are unnecessary, just remove them. Signed-off-by: Xu Wang --- drivers/video/fbdev/au1100fb.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbdev/au1100fb.c b/drivers/video/fbdev/au1100fb.c index 37a6512feda0..3659dfbb81c1 100644 --- a/drivers/video/fbdev/au1100fb.c +++ b/drivers/video/fbdev/au1100fb.c @@ -560,8 +560,7 @@ int au1100fb_drv_suspend(struct platform_device *dev, pm_message_t state) /* Blank the LCD */ au1100fb_fb_blank(VESA_POWERDOWN, &fbdev->info); - if (fbdev->lcdclk) - clk_disable(fbdev->lcdclk); + clk_disable(fbdev->lcdclk); memcpy(&fbregs, fbdev->regs, sizeof(struct au1100fb_regs)); @@ -577,8 +576,7 @@ int au1100fb_drv_resume(struct platform_device *dev) memcpy(fbdev->regs, &fbregs, sizeof(struct au1100fb_regs)); - if (fbdev->lcdclk) - clk_enable(fbdev->lcdclk); + clk_enable(fbdev->lcdclk); /* Unblank the LCD */ au1100fb_fb_blank(VESA_NO_BLANKING, &fbdev->info); -- 2.17.1