summaryrefslogtreecommitdiffstats
path: root/drivers/tty/vt/vt_ioctl.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-02-24 08:39:55 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-02-24 08:39:55 +0100
commitba08cf452f3493e96793c9fec4ebb45e7101a0c0 (patch)
tree61200038de5d9c6ba50dadfa7f065d029fa06174 /drivers/tty/vt/vt_ioctl.c
parente24cd4e6d6aa3ca741cdfdfc01118c4016acebea (diff)
parentf8788d86ab28f61f7b46eb6be375f8a726783636 (diff)
downloadlinux-ba08cf452f3493e96793c9fec4ebb45e7101a0c0.tar.bz2
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.c17
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;