mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 22:02:02 +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
1 changed files with 1 additions and 2 deletions
|
@ -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 a new issue