Skip to content

Commit

Permalink
pwm: sifive: Simplify if-if to if-else
Browse files Browse the repository at this point in the history
Use if and else instead of if(A) and if (!A).

Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
  • Loading branch information
Wan Jiabing authored and Thierry Reding committed May 20, 2022
1 parent 2bf8ee0 commit 762c4e7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/pwm/pwm-sifive.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,9 @@ static int pwm_sifive_enable(struct pwm_chip *chip, bool enable)
dev_err(ddata->chip.dev, "Enable clk failed\n");
return ret;
}
}

if (!enable)
} else {
clk_disable(ddata->clk);
}

return 0;
}
Expand Down

0 comments on commit 762c4e7

Please sign in to comment.