aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/pi433/pi433_if.c
diff options
context:
space:
mode:
authorValentin Vidic <Valentin.Vidic@CARNet.hr>2017-12-19 15:56:21 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-12-19 16:05:54 +0100
commit57fa80f5b0c97d319811a0dfa3d7b29ea8103c59 (patch)
tree1c4859e899b4ac95d574c25f01314e3e0748555d /drivers/staging/pi433/pi433_if.c
parentstaging: pi433: replace unsigned with unsigned int (diff)
downloadlinux-dev-57fa80f5b0c97d319811a0dfa3d7b29ea8103c59.tar.xz
linux-dev-57fa80f5b0c97d319811a0dfa3d7b29ea8103c59.zip
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>
Diffstat (limited to 'drivers/staging/pi433/pi433_if.c')
-rw-r--r--drivers/staging/pi433/pi433_if.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index f46612f6559c..264d798a1cf2 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/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++;