diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-02-24 08:39:55 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-02-24 08:39:55 +0100 |
commit | ba08cf452f3493e96793c9fec4ebb45e7101a0c0 (patch) | |
tree | 61200038de5d9c6ba50dadfa7f065d029fa06174 /drivers/tty/vt/vt_ioctl.c | |
parent | n_tty: Distribute switch variables for initialization (diff) | |
parent | Linux 5.6-rc3 (diff) | |
download | linux-ba08cf452f3493e96793c9fec4ebb45e7101a0c0.tar.xz linux-ba08cf452f3493e96793c9fec4ebb45e7101a0c0.zip |
Merge 5.6-rc3 into tty-next
We want the tty fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/vt/vt_ioctl.c')
-rw-r--r-- | drivers/tty/vt/vt_ioctl.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c index 934fd46e7370..693d9d7ffb68 100644 --- a/drivers/tty/vt/vt_ioctl.c +++ b/drivers/tty/vt/vt_ioctl.c @@ -891,15 +891,20 @@ int vt_ioctl(struct tty_struct *tty, return -EINVAL; for (i = 0; i < MAX_NR_CONSOLES; i++) { + struct vc_data *vcp; + if (!vc_cons[i].d) continue; console_lock(); - if (v.v_vlin) - vc_cons[i].d->vc_scan_lines = v.v_vlin; - if (v.v_clin) - vc_cons[i].d->vc_font.height = v.v_clin; - vc_cons[i].d->vc_resize_user = 1; - vc_resize(vc_cons[i].d, v.v_cols, v.v_rows); + vcp = vc_cons[i].d; + if (vcp) { + if (v.v_vlin) + vcp->vc_scan_lines = v.v_vlin; + if (v.v_clin) + vcp->vc_font.height = v.v_clin; + vcp->vc_resize_user = 1; + vc_resize(vcp, v.v_cols, v.v_rows); + } console_unlock(); } break; |