Skip to content

Commit f95c139

Browse files
committed
Merge tag 'fbdev-for-6.12-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev
Pull fbdev fixes from Helge Deller: - crash fix in fbcon_putcs - avoid a possible string memory overflow in sisfb - minor code optimizations in omapfb and fbcon * tag 'fbdev-for-6.12-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: fbdev: sisfb: Fix strbuf array overflow fbcon: break earlier in search_fb_in_map and search_for_mapped_con fbdev: omapfb: Call of_node_put(ep) only once in omapdss_of_find_source_for_first_ep() fbcon: Fix a NULL pointer dereference issue in fbcon_putcs
2 parents 994aeac + 9cf14f5 commit f95c139

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

drivers/video/fbdev/core/fbcon.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,10 @@ static int search_fb_in_map(int idx)
512512
int i, retval = 0;
513513

514514
for (i = first_fb_vc; i <= last_fb_vc; i++) {
515-
if (con2fb_map[i] == idx)
515+
if (con2fb_map[i] == idx) {
516516
retval = 1;
517+
break;
518+
}
517519
}
518520
return retval;
519521
}
@@ -523,8 +525,10 @@ static int search_for_mapped_con(void)
523525
int i, retval = 0;
524526

525527
for (i = first_fb_vc; i <= last_fb_vc; i++) {
526-
if (con2fb_map[i] != -1)
528+
if (con2fb_map[i] != -1) {
527529
retval = 1;
530+
break;
531+
}
528532
}
529533
return retval;
530534
}
@@ -861,6 +865,8 @@ static int set_con2fb_map(int unit, int newidx, int user)
861865
return err;
862866

863867
fbcon_add_cursor_work(info);
868+
} else if (vc) {
869+
set_blitting_type(vc, info);
864870
}
865871

866872
con2fb_map[unit] = newidx;

drivers/video/fbdev/omap2/omapfb/dss/dss-of.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,9 @@ omapdss_of_find_source_for_first_ep(struct device_node *node)
129129
return ERR_PTR(-EINVAL);
130130

131131
src_port = of_graph_get_remote_port(ep);
132-
if (!src_port) {
133-
of_node_put(ep);
134-
return ERR_PTR(-EINVAL);
135-
}
136-
137132
of_node_put(ep);
133+
if (!src_port)
134+
return ERR_PTR(-EINVAL);
138135

139136
src = omap_dss_find_output_by_port_node(src_port);
140137

drivers/video/fbdev/sis/sis_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ static void sisfb_search_mode(char *name, bool quiet)
183183
{
184184
unsigned int j = 0, xres = 0, yres = 0, depth = 0, rate = 0;
185185
int i = 0;
186-
char strbuf[16], strbuf1[20];
186+
char strbuf[24], strbuf1[20];
187187
char *nameptr = name;
188188

189189
/* We don't know the hardware specs yet and there is no ivideo */

0 commit comments

Comments
 (0)