lkml.org 
[lkml]   [2017]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH 7/8] staging: pi433: avoid logging ENOMEM messages
Fixes checkpatch warning:

WARNING: Possible unnecessary 'out of memory' message

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
---
drivers/staging/pi433/pi433_if.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index 8234473e1add..9e558154a143 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -936,10 +936,8 @@ static int pi433_open(struct inode *inode, struct file *filp)

if (!device->rx_buffer) {
device->rx_buffer = kmalloc(MAX_MSG_SIZE, GFP_KERNEL);
- if (!device->rx_buffer) {
- dev_dbg(device->dev, "open/ENOMEM\n");
+ if (!device->rx_buffer)
return -ENOMEM;
- }
}

device->users++;
--
2.15.0
\
 
 \ /
  Last update: 2017-12-13 16:08    [W:0.107 / U:0.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site