Commit 162a689a authored by François Diakhaté's avatar François Diakhaté Committed by Rusty Russell

virtio: console: Fix early_put_chars usage

Currently early_put_chars is not used by virtio_console because it can
only be used once a port has been found, at which point it's too late
because it is no longer needed. This patch should fix it.
Acked-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: default avatarAmit Shah <amit.shah@redhat.com>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 9a82446b
...@@ -646,13 +646,13 @@ static int put_chars(u32 vtermno, const char *buf, int count) ...@@ -646,13 +646,13 @@ static int put_chars(u32 vtermno, const char *buf, int count)
{ {
struct port *port; struct port *port;
if (unlikely(early_put_chars))
return early_put_chars(vtermno, buf, count);
port = find_port_by_vtermno(vtermno); port = find_port_by_vtermno(vtermno);
if (!port) if (!port)
return 0; return 0;
if (unlikely(early_put_chars))
return early_put_chars(vtermno, buf, count);
return send_buf(port, (void *)buf, count); return send_buf(port, (void *)buf, count);
} }
......
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