Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16fdcc7b authored by Valentin Vidic's avatar Valentin Vidic Committed by Greg Kroah-Hartman
Browse files

staging: pi433: rewrite comparison with NULL



Fixes checkpatch warning for comparing value with NULL.

Signed-off-by: default avatarValentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6bd00b5a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);
	}