aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-ipq40xx
diff options
context:
space:
mode:
authorRobert Marko <robert.marko@sartura.hr>2020-10-28 13:56:25 +0100
committerTom Rini <trini@konsulko.com>2020-12-01 14:12:28 -0500
commit20476b51aa4d77c774f14671a185b5ac94f86c49 (patch)
tree234eeb503e68e7af4264e6af735c0cdcee0461cd /arch/arm/mach-ipq40xx
parent164cc98a7b9a8962a69cf4ae43bacb35eb98f51d (diff)
downloadu-boot-20476b51aa4d77c774f14671a185b5ac94f86c49.zip
u-boot-20476b51aa4d77c774f14671a185b5ac94f86c49.tar.gz
u-boot-20476b51aa4d77c774f14671a185b5ac94f86c49.tar.bz2
IPQ40xx: clk: dont always return 0
Currently the driver will go through the clock ID-s and set/enable them as needed. But if the ID is unknown it will fall through the switch case to the default case which will always return 0. This is not correct and default cases should return a error code since clock ID is unknown. So lets return -EINVAL instead. Signed-off-by: Robert Marko <robert.marko@sartura.hr> Cc: Luka Perkov <luka.perkov@sartura.hr>
Diffstat (limited to 'arch/arm/mach-ipq40xx')
-rw-r--r--arch/arm/mach-ipq40xx/clock-ipq4019.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-ipq40xx/clock-ipq4019.c b/arch/arm/mach-ipq40xx/clock-ipq4019.c
index ac2b830..7308563 100644
--- a/arch/arm/mach-ipq40xx/clock-ipq4019.c
+++ b/arch/arm/mach-ipq40xx/clock-ipq4019.c
@@ -26,7 +26,7 @@ ulong msm_set_rate(struct clk *clk, ulong rate)
/* This clock is already initialized by SBL1 */
return 0;
default:
- return 0;
+ return -EINVAL;
}
}
@@ -56,7 +56,7 @@ static int msm_enable(struct clk *clk)
/* This clock is already initialized by SBL1 */
return 0;
default:
- return 0;
+ return -EINVAL;
}
}