Skip to content

Commit 196488f

Browse files
GuEe-GUIRbb666
authored andcommitted
[dm][graphic] fixup the simple framebuffer regulator check
Signed-off-by: GuEe-GUI <2991707448@qq.com>
1 parent b5b8500 commit 196488f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

components/drivers/graphic/framebuffer/fb-simple.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ static rt_err_t simplefb_regulator_probe(struct simplefb *sfb,
111111
}
112112
}
113113

114+
if (!sfb->supplys_nr)
115+
{
116+
return RT_EOK;
117+
}
118+
114119
sfb->supplys = rt_calloc(sfb->supplys_nr, sizeof(sfb->supplys[0]));
115120

116121
if (!sfb->supplys)

0 commit comments

Comments
 (0)