aboutsummaryrefslogtreecommitdiff
path: root/drivers/tty/vt
diff options
context:
space:
mode:
authorJiri Slaby2022-06-07 12:49:45 +0200
committerGreg Kroah-Hartman2022-06-10 13:37:03 +0200
commitfc440658346e1bff9b6661467f55856d1df1cdb2 (patch)
tree4de3449f418184428255875402673823a21a7fc7 /drivers/tty/vt
parent63c4f92fcca3f077de1d9d1a99a690f5ea381e58 (diff)
tty/vt: consolemap: use con_allocate_new() in con_unshare_unimap()
The old->refcount is guaranteed to be > 1, so we can directly call con_allocate_new() to make the code more obvious. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20220607104946.18710-35-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/vt')
-rw-r--r--drivers/tty/vt/consolemap.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/tty/vt/consolemap.c b/drivers/tty/vt/consolemap.c
index 14d3fbff015c..f97f7ee6268b 100644
--- a/drivers/tty/vt/consolemap.c
+++ b/drivers/tty/vt/consolemap.c
@@ -580,14 +580,10 @@ static struct uni_pagedict *con_unshare_unimap(struct vc_data *vc,
int ret;
u16 uni = 0;
- ret = con_do_clear_unimap(vc);
+ ret = con_allocate_new(vc);
if (ret)
return ERR_PTR(ret);
- /*
- * Since refcount was > 1, con_clear_unimap() allocated a new
- * uni_pagedict for this vc. Re: old != new
- */
new = *vc->vc_uni_pagedir_loc;
/*