* [PATCH] tty/vt/selection: Delete an error message for a failed memory allocation in set_selection()
@ 2017-12-06 19:12 SF Markus Elfring
0 siblings, 0 replies; only message in thread
From: SF Markus Elfring @ 2017-12-06 19:12 UTC (permalink / raw)
To: kernel-janitors, Adam Borowski, Al Viro, Greg Kroah-Hartman,
Jiri Slaby, Kate Stewart
Cc: LKML
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 6 Dec 2017 20:07:34 +0100
Omit an extra message for a memory allocation failure in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/tty/vt/selection.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/tty/vt/selection.c b/drivers/tty/vt/selection.c
index af4da9507180..d6087f2757ab 100644
--- a/drivers/tty/vt/selection.c
+++ b/drivers/tty/vt/selection.c
@@ -286,7 +286,6 @@ int set_selection(const struct tiocl_selection __user *sel, struct tty_struct *t
multiplier = use_unicode ? 3 : 1; /* chars can take up to 3 bytes */
bp = kmalloc(((sel_end-sel_start)/2+1)*multiplier, GFP_KERNEL);
if (!bp) {
- printk(KERN_WARNING "selection: kmalloc() failed\n");
clear_selection();
return -ENOMEM;
}
--
2.15.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-12-06 19:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-06 19:12 [PATCH] tty/vt/selection: Delete an error message for a failed memory allocation in set_selection() SF Markus Elfring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®