Commit f95c1390 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'fbdev-for-6.12-rc1-2' of...

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
parents 994aeacb 9cf14f5a
...@@ -512,8 +512,10 @@ static int search_fb_in_map(int idx) ...@@ -512,8 +512,10 @@ static int search_fb_in_map(int idx)
int i, retval = 0; int i, retval = 0;
for (i = first_fb_vc; i <= last_fb_vc; i++) { for (i = first_fb_vc; i <= last_fb_vc; i++) {
if (con2fb_map[i] == idx) if (con2fb_map[i] == idx) {
retval = 1; retval = 1;
break;
}
} }
return retval; return retval;
} }
...@@ -523,8 +525,10 @@ static int search_for_mapped_con(void) ...@@ -523,8 +525,10 @@ static int search_for_mapped_con(void)
int i, retval = 0; int i, retval = 0;
for (i = first_fb_vc; i <= last_fb_vc; i++) { for (i = first_fb_vc; i <= last_fb_vc; i++) {
if (con2fb_map[i] != -1) if (con2fb_map[i] != -1) {
retval = 1; retval = 1;
break;
}
} }
return retval; return retval;
} }
...@@ -861,6 +865,8 @@ static int set_con2fb_map(int unit, int newidx, int user) ...@@ -861,6 +865,8 @@ static int set_con2fb_map(int unit, int newidx, int user)
return err; return err;
fbcon_add_cursor_work(info); fbcon_add_cursor_work(info);
} else if (vc) {
set_blitting_type(vc, info);
} }
con2fb_map[unit] = newidx; con2fb_map[unit] = newidx;
......
...@@ -129,12 +129,9 @@ omapdss_of_find_source_for_first_ep(struct device_node *node) ...@@ -129,12 +129,9 @@ omapdss_of_find_source_for_first_ep(struct device_node *node)
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
src_port = of_graph_get_remote_port(ep); src_port = of_graph_get_remote_port(ep);
if (!src_port) {
of_node_put(ep); of_node_put(ep);
if (!src_port)
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
}
of_node_put(ep);
src = omap_dss_find_output_by_port_node(src_port); src = omap_dss_find_output_by_port_node(src_port);
......
...@@ -183,7 +183,7 @@ static void sisfb_search_mode(char *name, bool quiet) ...@@ -183,7 +183,7 @@ static void sisfb_search_mode(char *name, bool quiet)
{ {
unsigned int j = 0, xres = 0, yres = 0, depth = 0, rate = 0; unsigned int j = 0, xres = 0, yres = 0, depth = 0, rate = 0;
int i = 0; int i = 0;
char strbuf[16], strbuf1[20]; char strbuf[24], strbuf1[20];
char *nameptr = name; char *nameptr = name;
/* We don't know the hardware specs yet and there is no ivideo */ /* We don't know the hardware specs yet and there is no ivideo */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment