]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: pi433: avoid logging ENOMEM messages
authorValentin Vidic <Valentin.Vidic@CARNet.hr>
Tue, 19 Dec 2017 14:56:21 +0000 (15:56 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Dec 2017 15:05:54 +0000 (16:05 +0100)
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>
drivers/staging/pi433/pi433_if.c

index f46612f6559ce289054c6cf2264a6007f6610f8d..264d798a1cf2588427dc58f4e8f833b6955b7b48 100644 (file)
@@ -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++;