summaryrefslogtreecommitdiffstats
path: root/drivers/staging/pi433
diff options
context:
space:
mode:
authorValentin Vidic <Valentin.Vidic@CARNet.hr>2017-12-10 15:31:17 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-12-13 12:59:40 +0100
commit16fdcc7b41e021332784b79607835f9c8fe90e85 (patch)
tree48b36513d9da121119a413a275ae2050c83450d3 /drivers/staging/pi433
parent6bd00b5ab6621b598df97533e148e5cbd35cc2d2 (diff)
downloadlinux-stable-16fdcc7b41e021332784b79607835f9c8fe90e85.tar.gz
linux-stable-16fdcc7b41e021332784b79607835f9c8fe90e85.tar.bz2
linux-stable-16fdcc7b41e021332784b79607835f9c8fe90e85.zip
staging: pi433: rewrite comparison with NULL
Fixes checkpatch warning for comparing value with NULL. Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/pi433')
-rw-r--r--drivers/staging/pi433/pi433_if.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index 00cd8193cfd4..86e358831feb 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -873,7 +873,7 @@ pi433_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
instance = filp->private_data;
device = instance->device;
- if (device == NULL)
+ if (!device)
return -ESHUTDOWN;
switch (cmd) {
@@ -985,7 +985,7 @@ static int pi433_release(struct inode *inode, struct file *filp)
if (!device->users) {
kfree(device->rx_buffer);
device->rx_buffer = NULL;
- if (device->spi == NULL)
+ if (!device->spi)
kfree(device);
}