Skip to content

Commit b5c525a

Browse files
Yihao Hanhdeller
authored andcommitted
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 <[email protected]> Signed-off-by: Helge Deller <[email protected]>
1 parent a09d2d0 commit b5c525a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/video/fbdev/au1100fb.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -560,8 +560,7 @@ int au1100fb_drv_suspend(struct platform_device *dev, pm_message_t state)
560560
/* Blank the LCD */
561561
au1100fb_fb_blank(VESA_POWERDOWN, &fbdev->info);
562562

563-
if (fbdev->lcdclk)
564-
clk_disable(fbdev->lcdclk);
563+
clk_disable(fbdev->lcdclk);
565564

566565
memcpy(&fbregs, fbdev->regs, sizeof(struct au1100fb_regs));
567566

@@ -577,8 +576,7 @@ int au1100fb_drv_resume(struct platform_device *dev)
577576

578577
memcpy(fbdev->regs, &fbregs, sizeof(struct au1100fb_regs));
579578

580-
if (fbdev->lcdclk)
581-
clk_enable(fbdev->lcdclk);
579+
clk_enable(fbdev->lcdclk);
582580

583581
/* Unblank the LCD */
584582
au1100fb_fb_blank(VESA_NO_BLANKING, &fbdev->info);

0 commit comments

Comments
 (0)