paride: Delete an error message for a failed memory allocation in two functions
Subsystems (2)
PATCH 1/1 paride: Delete an error message for a failed memory allocation in two functions
From: Markus Elfring <[email protected]>
Date: Mon, 7 Aug 2017 11:11:34 +0200
Omit an extra message for a memory allocation failure in these functions.
This issue was detected by using the Coccinelle software.
Signed-off-by Markus Elfring <[email protected]>
--- drivers/block/paride/pg.c | 1 - drivers/block/paride/pt.c | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-)
drivers/block/paride/pg.c +0 -1
@@ -550,7 +550,6 @@ static int pg_open(struct inode *inode, struct file *file) dev->bufptr =kmalloc (PG_MAX_DATA ,GFP_KERNEL );if (dev->bufptr =NULL ) {clear_bit (0 , &dev->access); -printk ("%s: buffer allocation failed\n" , dev->name); ret = -ENOMEM ; goto out; }
drivers/block/paride/pt.c +1 -3
@@ -687,10 +687,8 @@ static int pt_open(struct inode *inode, struct file *file) err = -ENOMEM ; tape->bufptr =kmalloc (PT_BUFSIZE ,GFP_KERNEL ); -if (tape->bufptr =NULL ) { -printk ("%s: buffer allocation failed\n" , tape->name); +if (!tape->bufptr) goto out; - } file->private_data = tape;mutex_unlock (&pt_mutex);
Signature · 1 line
2.13.4