tty: synclinkmp: Delete an error message for a failed memory allocation in startup()
Subsystems (2)
PATCH 1/1 tty: synclinkmp: Delete an error message for a failed memory allocation in startup()
From: Markus Elfring <[email protected]>
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 <[email protected]>
--- drivers/tty/synclinkmp.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/tty/synclinkmp.c +1 -4
@@ -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 ;
Signature · 1 line
2.15.1