Commit 57fa80f5 authored by Valentin Vidic's avatar Valentin Vidic Committed by Greg Kroah-Hartman
Browse files

staging: pi433: avoid logging ENOMEM messages



Fixes checkpatch warning:

  WARNING: Possible unnecessary 'out of memory' message

Signed-off-by: default avatarValentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 211c2820
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -934,11 +934,9 @@ 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++;
	instance = kzalloc(sizeof(*instance), GFP_KERNEL);