mirror of
https://github.com/ivoszbg/uniLoader.git
synced 2026-08-15 05:18:32 +00:00
lib: simplefb: make get_font_scale_factor run only if simplefb probed
get_font_scale_factor() unconditionally dereferences fb_info and debug.c's fb_output() calls get_font_scale_factor() on each printk call, even before we have simplefb registered. As __simplefb_raw_print has a check if we're past simplefb probe (fb_info is filled), do the same for get_font_scale_factor() and return 1 (not scaled) if the struct is not filled.
This commit is contained in:
1 parent
3c90e2b35f
commit
e71ad3b705
1 file changed
+3
@@ -62,6 +62,9 @@ static void draw_pixel(volatile char *fb, int x, int y, int width, int stride,
|
||||
|
||||
int get_font_scale_factor()
|
||||
{
|
||||
if (!fb_info)
|
||||
return 1;
|
||||
|
||||
if (fb_info->scale) {
|
||||
return fb_info->scale;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user