We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f4ef48 commit 6cd1ed5Copy full SHA for 6cd1ed5
drivers/tty/vt/vt_ioctl.c
@@ -876,15 +876,20 @@ int vt_ioctl(struct tty_struct *tty,
876
return -EINVAL;
877
878
for (i = 0; i < MAX_NR_CONSOLES; i++) {
879
+ struct vc_data *vcp;
880
+
881
if (!vc_cons[i].d)
882
continue;
883
console_lock();
- if (v.v_vlin)
- vc_cons[i].d->vc_scan_lines = v.v_vlin;
884
- if (v.v_clin)
885
- vc_cons[i].d->vc_font.height = v.v_clin;
886
- vc_cons[i].d->vc_resize_user = 1;
887
- 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;
888
+ if (v.v_clin)
889
+ vcp->vc_font.height = v.v_clin;
890
+ vcp->vc_resize_user = 1;
891
+ vc_resize(vcp, v.v_cols, v.v_rows);
892
+ }
893
console_unlock();
894
}
895
break;
0 commit comments