diff options
author | Yihao Han <hanyihao@vivo.com> | 2022-06-08 04:43:25 -0700 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2022-06-20 20:19:50 +0200 |
commit | b5c525abe717f2f41684b8581c13347d50d5285a (patch) | |
tree | 834c24c8e7b93bc3b87b858a05e68beffdb383b9 /drivers | |
parent | a09d2d00af53b43c6f11e6ab3cb58443c2cac8a7 (diff) | |
download | linux-stable-b5c525abe717f2f41684b8581c13347d50d5285a.tar.gz linux-stable-b5c525abe717f2f41684b8581c13347d50d5285a.tar.bz2 linux-stable-b5c525abe717f2f41684b8581c13347d50d5285a.zip |
video: fbdev: au1100fb: Drop unnecessary NULL ptr check
clk_disable() already checks the clk ptr using IS_ERR_OR_NULL(clk) and
clk_enable() checks the clk ptr using !clk, so there is no need to check clk
ptr again before calling them.
Signed-off-by: Yihao Han <hanyihao@vivo.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/fbdev/au1100fb.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/video/fbdev/au1100fb.c b/drivers/video/fbdev/au1100fb.c index 52f731a61482..519313b8bb00 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); |