clk: Return value calculated by ERR_PTR
In clk_set_default_get_by_id ret is passed to ERR_PTR but nothing is done with the value that this calculates which is obviously not the intention of the code. This is confirmed by the code around where this function is called. Instead return the value from ERR_PTR. This issue found by Smatch. Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org> Acked-by: Quentin Schulz <quentin.schulz@cherry.de>
This commit is contained in:
committed by
Tom Rini
parent
bf09c6abfc
commit
644b4650ee
@@ -199,7 +199,7 @@ static struct clk *clk_set_default_get_by_id(struct clk *clk)
|
||||
if (ret) {
|
||||
debug("%s(): could not get parent clock pointer, id %lu\n",
|
||||
__func__, clk->id);
|
||||
ERR_PTR(ret);
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user