[U-Boot] [PATCH] clk: sandbox: don't check clk ID against 0

Simon Glass sjg at chromium.org
Wed Jun 22 16:52:17 CEST 2016


On 21 June 2016 at 13:32, Stephen Warren <swarren at wwwdotorg.org> wrote:
> From: Stephen Warren <swarren at nvidia.com>
>
> clk->id is unsigned, so it can't be < 0. Remove the check for that.
>
> FWIW, this issue was introduced when the clock API converted e.g.
> clk_get_rate()'s clock ID parameter from an int to an unsigned long
> (with a struct clk), without removing this check.
>
> Fixes: 135aa9500264 ("clk: convert API to match reset/mailbox style")
> Reported-by: Coverity Scan
> Signed-off-by: Stephen Warren <swarren at nvidia.com>
> ---
>  drivers/clk/clk_sandbox.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Acked-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list