mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
clk: Return -ENOSYS when system call is not available
Update clk_composite_set_parent() to use -ENOSYS, which is the correct error code for U-Boot. Also rearrange the code so that the error condition is clearly indicated and the function runs to the end in the normal case, since this is the common style in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Sean Anderson <seanga2@gmail.com>
This commit is contained in:
parent
9042bf6fe4
commit
3bc11b983d
1 changed files with 4 additions and 4 deletions
|
@ -37,10 +37,10 @@ static int clk_composite_set_parent(struct clk *clk, struct clk *parent)
|
|||
const struct clk_ops *mux_ops = composite->mux_ops;
|
||||
struct clk *mux = composite->mux;
|
||||
|
||||
if (mux && mux_ops)
|
||||
return mux_ops->set_parent(mux, parent);
|
||||
else
|
||||
return -ENOTSUPP;
|
||||
if (!mux || !mux_ops)
|
||||
return -ENOSYS;
|
||||
|
||||
return mux_ops->set_parent(mux, parent);
|
||||
}
|
||||
|
||||
static unsigned long clk_composite_recalc_rate(struct clk *clk)
|
||||
|
|
Loading…
Reference in a new issue