Commit 5491424d authored by Yihao Han's avatar Yihao Han Committed by Helge Deller

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: default avatarYihao Han <hanyihao@vivo.com>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent b5c525ab
...@@ -237,7 +237,6 @@ static int simplefb_clocks_get(struct simplefb_par *par, ...@@ -237,7 +237,6 @@ static int simplefb_clocks_get(struct simplefb_par *par,
if (IS_ERR(clock)) { if (IS_ERR(clock)) {
if (PTR_ERR(clock) == -EPROBE_DEFER) { if (PTR_ERR(clock) == -EPROBE_DEFER) {
while (--i >= 0) { while (--i >= 0) {
if (par->clks[i])
clk_put(par->clks[i]); clk_put(par->clks[i]);
} }
kfree(par->clks); kfree(par->clks);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment