mirror of
https://github.com/torvalds/linux.git
synced 2024-12-11 05:33:09 +00:00
clk: sunxi: tcon-ch1: Do not return a negative error in get_parent
get_parent is supposed to return an unsigned 8 bit integer, so returning -EINVAL is a bad idea. Remove it. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
This commit is contained in:
parent
1a695a905c
commit
4de2d58bc9
@ -85,9 +85,6 @@ static u8 tcon_ch1_get_parent(struct clk_hw *hw)
|
|||||||
reg = readl(tclk->reg) >> TCON_CH1_SCLK2_MUX_SHIFT;
|
reg = readl(tclk->reg) >> TCON_CH1_SCLK2_MUX_SHIFT;
|
||||||
reg &= reg >> TCON_CH1_SCLK2_MUX_MASK;
|
reg &= reg >> TCON_CH1_SCLK2_MUX_MASK;
|
||||||
|
|
||||||
if (reg >= num_parents)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
return reg;
|
return reg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user