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>
This commit is contained in:
Valentin Vidic 2017-12-19 15:56:21 +01:00 committed by Greg Kroah-Hartman
parent 211c282061
commit 57fa80f5b0

View 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++;