From: Zizhi Wo Date: Thu, 4 Sep 2025 02:39:55 +0000 (+0800) Subject: tty/vt: Add missing return value for VT_RESIZE in vt_ioctl() X-Git-Tag: v6.18-rc1~77^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da7e8b3823962b13e713d4891e136a261ed8e6a2;p=thirdparty%2Fkernel%2Fstable.git 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 Link: https://lore.kernel.org/r/20250904023955.3892120-1-wozizhi@huaweicloud.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c index c9f11c4bd9fe8..28993a3d0acb6 100644 --- a/drivers/tty/vt/vt_ioctl.c +++ b/drivers/tty/vt/vt_ioctl.c @@ -908,7 +908,9 @@ int vt_ioctl(struct tty_struct *tty, if (vc) { /* FIXME: review v tty lock */ - __vc_resize(vc_cons[i].d, cc, ll, true); + ret = __vc_resize(vc_cons[i].d, cc, ll, true); + if (ret) + return ret; } } break;