mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-19 13:41:31 +00:00
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>
This commit is contained in:
parent
164cc98a7b
commit
20476b51aa
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue