Skip to content

Commit 5491424

Browse files
Yihao Hanhdeller
authored andcommitted
video: fbdev: simplefb: Check before clk_put() not needed
clk_put() already checks the clk ptr using !clk and IS_ERR() so there is no need to check it again before calling it. Signed-off-by: Yihao Han <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Helge Deller <[email protected]>
1 parent b5c525a commit 5491424

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/video/fbdev/simplefb.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,7 @@ static int simplefb_clocks_get(struct simplefb_par *par,
237237
if (IS_ERR(clock)) {
238238
if (PTR_ERR(clock) == -EPROBE_DEFER) {
239239
while (--i >= 0) {
240-
if (par->clks[i])
241-
clk_put(par->clks[i]);
240+
clk_put(par->clks[i]);
242241
}
243242
kfree(par->clks);
244243
return -EPROBE_DEFER;

0 commit comments

Comments
 (0)