mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-16 10:17:32 +00:00
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:
parent
b5c525abe7
commit
5491424d17
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user