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>
if (ret) {
debug("%s(): could not get parent clock pointer, id %lu\n",
__func__, clk->id);
- ERR_PTR(ret);
+ return ERR_PTR(ret);
}
}