diff options
author | Yihao Han <hanyihao@vivo.com> | 2022-06-02 11:42:18 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2022-06-20 20:22:16 +0200 |
commit | 5491424d17bdeb7b7852a59367858251783f8398 (patch) | |
tree | 656041ae0addf9c97a1e86c1a3599d242c3bbebf /drivers/video | |
parent | video: fbdev: au1100fb: Drop unnecessary NULL ptr check (diff) | |
download | linux-5491424d17bdeb7b7852a59367858251783f8398.tar.xz linux-5491424d17bdeb7b7852a59367858251783f8398.zip |
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 <hanyihao@vivo.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fbdev/simplefb.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/video/fbdev/simplefb.c b/drivers/video/fbdev/simplefb.c index 2c198561c338..f96ce8801be4 100644 --- a/drivers/video/fbdev/simplefb.c +++ b/drivers/video/fbdev/simplefb.c @@ -237,8 +237,7 @@ static int simplefb_clocks_get(struct simplefb_par *par, if (IS_ERR(clock)) { if (PTR_ERR(clock) == -EPROBE_DEFER) { while (--i >= 0) { - if (par->clks[i]) - clk_put(par->clks[i]); + clk_put(par->clks[i]); } kfree(par->clks); return -EPROBE_DEFER; |