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 (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);
|
||||||
return -EPROBE_DEFER;
|
return -EPROBE_DEFER;
|
||||||
|
|
Loading…
Reference in New Issue