* [PATCH] tty: synclinkmp: Delete an error message for a failed memory allocation in startup()
@ 2017-12-06 20:24 ` SF Markus Elfring
0 siblings, 0 replies; 2+ messages in thread
From: SF Markus Elfring @ 2017-12-06 20:24 UTC (permalink / raw)
To: kernel-janitors, Greg Kroah-Hartman, Jiri Slaby; +Cc: LKML
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 6 Dec 2017 21:21:07 +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/synclinkmp.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/tty/synclinkmp.c b/drivers/tty/synclinkmp.c
index d45f234e1914..e47d19bbe87a 100644
--- a/drivers/tty/synclinkmp.c
+++ b/drivers/tty/synclinkmp.c
@@ -2640,11 +2640,8 @@ static int startup(SLMP_INFO * info)
if (!info->tx_buf) {
info->tx_buf = kmalloc(info->max_frame_size, GFP_KERNEL);
- if (!info->tx_buf) {
- printk(KERN_ERR"%s(%d):%s can't allocate transmit buffer\n",
- __FILE__,__LINE__,info->device_name);
+ if (!info->tx_buf)
return -ENOMEM;
- }
}
info->pending_bh = 0;
--
2.15.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] tty: synclinkmp: Delete an error message for a failed memory allocation in startup()
@ 2017-12-06 20:24 ` SF Markus Elfring
0 siblings, 0 replies; 2+ messages in thread
From: SF Markus Elfring @ 2017-12-06 20:24 UTC (permalink / raw)
To: kernel-janitors, Greg Kroah-Hartman, Jiri Slaby; +Cc: LKML
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 6 Dec 2017 21:21:07 +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/synclinkmp.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/tty/synclinkmp.c b/drivers/tty/synclinkmp.c
index d45f234e1914..e47d19bbe87a 100644
--- a/drivers/tty/synclinkmp.c
+++ b/drivers/tty/synclinkmp.c
@@ -2640,11 +2640,8 @@ static int startup(SLMP_INFO * info)
if (!info->tx_buf) {
info->tx_buf = kmalloc(info->max_frame_size, GFP_KERNEL);
- if (!info->tx_buf) {
- printk(KERN_ERR"%s(%d):%s can't allocate transmit buffer\n",
- __FILE__,__LINE__,info->device_name);
+ if (!info->tx_buf)
return -ENOMEM;
- }
}
info->pending_bh = 0;
--
2.15.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-06 20:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-06 20:24 [PATCH] tty: synclinkmp: Delete an error message for a failed memory allocation in startup() SF Markus Elfring
2017-12-06 20:24 ` SF Markus Elfring
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.