clk: tegra: Do not return 0 on failure
authorNicolin Chen <nicoleotsuka@gmail.com>
Thu, 29 Oct 2020 00:48:20 +0000 (17:48 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:54:26 +0000 (11:54 +0100)
commitb11905a3b977c39cb392d88decad4ecca5330859
treee7e8f4c2b39b6da2ba8664503eaba656523d3d54
parentdb003855f7d1afd7baeb25d8244e9c0ee8e4e276
clk: tegra: Do not return 0 on failure

commit 6160aca443148416994c022a35c77daeba948ea6 upstream.

Return values from read_dt_param() will be either TRUE (1) or
FALSE (0), while dfll_fetch_pwm_params() returns 0 on success
or an ERR code on failure.

So this patch fixes the bug of returning 0 on failure.

Fixes: 36541f0499fe ("clk: tegra: dfll: support PWM regulator control")
Cc: <stable@vger.kernel.org>
Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/clk/tegra/clk-dfll.c