From a666c70c0c2c63a60b5672a14b022da9376cffb9 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Tue, 14 Jun 2022 11:05:36 +0200 Subject: tty/vt: consolemap: remove dflt reset from con_do_clear_unimap() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit con_do_clear_unimap() sets dflt to NULL and then calls con_release_unimap() which does the very same as the first thing. So remove the former as it is apparently superfluous. Suggested-by: Ilpo Järvinen Reviewed-by: Ilpo Järvinen Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20220614090537.15557-7-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman --- drivers/tty/vt/consolemap.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/tty/vt') diff --git a/drivers/tty/vt/consolemap.c b/drivers/tty/vt/consolemap.c index 9e94ec0e0f83..5f3e58165b98 100644 --- a/drivers/tty/vt/consolemap.c +++ b/drivers/tty/vt/consolemap.c @@ -563,8 +563,6 @@ static int con_do_clear_unimap(struct vc_data *vc) if (!old || old->refcount > 1) return con_allocate_new(vc); - if (old == dflt) - dflt = NULL; old->sum = 0; con_release_unimap(old); -- cgit v1.2.3