mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-15 19:51:37 +00:00
video: mxsfb: fix clk_get_by_name() return value check
If clk_get_by_name() returns 0 it means it executed successfully while now we consider it as an error. So let's check if return value is negative to be an error. Otherwise this prevents "axi" and "disp_axi" to be enabled. Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
This commit is contained in:
parent
578b479aff
commit
f36b3f8f17
1 changed files with 2 additions and 2 deletions
|
@ -89,7 +89,7 @@ static void mxs_lcd_init(struct udevice *dev, u32 fb_addr,
|
|||
}
|
||||
|
||||
ret = clk_get_by_name(dev, "axi", &clk);
|
||||
if (!ret) {
|
||||
if (ret < 0) {
|
||||
debug("%s: Failed to get mxs axi clk: %d\n", __func__, ret);
|
||||
} else {
|
||||
ret = clk_enable(&clk);
|
||||
|
@ -100,7 +100,7 @@ static void mxs_lcd_init(struct udevice *dev, u32 fb_addr,
|
|||
}
|
||||
|
||||
ret = clk_get_by_name(dev, "disp_axi", &clk);
|
||||
if (!ret) {
|
||||
if (ret < 0) {
|
||||
debug("%s: Failed to get mxs disp_axi clk: %d\n", __func__, ret);
|
||||
} else {
|
||||
ret = clk_enable(&clk);
|
||||
|
|
Loading…
Add table
Reference in a new issue