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>
This commit is contained in:
Valentin Vidic 2017-12-10 15:31:17 +01:00 committed by Greg Kroah-Hartman
parent 6bd00b5ab6
commit 16fdcc7b41

View File

@ -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);
}