{
struct sandbox_clk_priv *priv = dev_get_priv(clk->dev);
- if (clk->id < 0 || clk->id >= SANDBOX_CLK_ID_COUNT)
+ if (clk->id >= SANDBOX_CLK_ID_COUNT)
return -EINVAL;
return priv->rate[clk->id];
struct sandbox_clk_priv *priv = dev_get_priv(clk->dev);
ulong old_rate;
- if (clk->id < 0 || clk->id >= SANDBOX_CLK_ID_COUNT)
+ if (clk->id >= SANDBOX_CLK_ID_COUNT)
return -EINVAL;
if (!rate)
{
struct sandbox_clk_priv *priv = dev_get_priv(clk->dev);
- if (clk->id < 0 || clk->id >= SANDBOX_CLK_ID_COUNT)
+ if (clk->id >= SANDBOX_CLK_ID_COUNT)
return -EINVAL;
priv->enabled[clk->id] = true;
{
struct sandbox_clk_priv *priv = dev_get_priv(clk->dev);
- if (clk->id < 0 || clk->id >= SANDBOX_CLK_ID_COUNT)
+ if (clk->id >= SANDBOX_CLK_ID_COUNT)
return -EINVAL;
priv->enabled[clk->id] = false;