Kaynağa Gözat

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Valentin Vidic 7 yıl önce
ebeveyn
işleme
57fa80f5b0
1 değiştirilmiş dosya ile 1 ekleme ve 3 silme
  1. 1 3
      drivers/staging/pi433/pi433_if.c

+ 1 - 3
drivers/staging/pi433/pi433_if.c

@@ -934,10 +934,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++;