Skip to content

Commit da7e8b3

Browse files
Zizhi Wogregkh
authored andcommitted
tty/vt: Add missing return value for VT_RESIZE in vt_ioctl()
In vt_ioctl(), the handler for VT_RESIZE always returns 0, which prevents users from detecting errors. Add the missing return value so that errors can be properly reported to users like vt_resizex(). Signed-off-by: Zizhi Wo <wozizhi@huaweicloud.com> Link: https://lore.kernel.org/r/20250904023955.3892120-1-wozizhi@huaweicloud.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 4574701 commit da7e8b3

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/tty/vt/vt_ioctl.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,9 @@ int vt_ioctl(struct tty_struct *tty,
908908

909909
if (vc) {
910910
/* FIXME: review v tty lock */
911-
__vc_resize(vc_cons[i].d, cc, ll, true);
911+
ret = __vc_resize(vc_cons[i].d, cc, ll, true);
912+
if (ret)
913+
return ret;
912914
}
913915
}
914916
break;

0 commit comments

Comments
 (0)