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>
This commit is contained in:
Yihao Han 2022-06-02 02:42:18 -07:00 committed by Helge Deller
parent b5c525abe7
commit 5491424d17
1 changed files with 1 additions and 2 deletions

View File

@ -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;