summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJes Sorensen <Jes.Sorensen@redhat.com>2015-05-05 18:35:56 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-08 15:25:56 +0200
commit4eb32b4892bbf5b71f63e468af0c7d660dac6d96 (patch)
treed487652caebdc8ef86823c40a21e7ac5df70137e /drivers
parent28723521a7e909d4fb19a682ad9a3647496fe62b (diff)
staging: unisys: Avoid some == 0 checks
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/unisys/visorchipset/file.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/unisys/visorchipset/file.c b/drivers/staging/unisys/visorchipset/file.c
index e63ef2a3a4a9..a17027c211a2 100644
--- a/drivers/staging/unisys/visorchipset/file.c
+++ b/drivers/staging/unisys/visorchipset/file.c
@@ -36,7 +36,7 @@ static struct visorchannel **file_controlvm_channel;
void
visorchipset_file_cleanup(dev_t major_dev)
{
- if (file_cdev.ops != NULL)
+ if (file_cdev.ops)
cdev_del(&file_cdev);
file_cdev.ops = NULL;
unregister_chrdev_region(major_dev, 1);
@@ -47,7 +47,7 @@ visorchipset_open(struct inode *inode, struct file *file)
{
unsigned minor_number = iminor(inode);
- if (minor_number != 0)
+ if (minor_number)
return -ENODEV;
file->private_data = NULL;
return 0;
@@ -73,16 +73,16 @@ visorchipset_mmap(struct file *file, struct vm_area_struct *vma)
switch (offset) {
case VISORCHIPSET_MMAP_CONTROLCHANOFFSET:
vma->vm_flags |= VM_IO;
- if (*file_controlvm_channel == NULL) {
+ if (!*file_controlvm_channel)
return -ENXIO;
- }
+
visorchannel_read(*file_controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol,
gp_control_channel),
&addr, sizeof(addr));
- if (addr == 0) {
+ if (!addr)
return -ENXIO;
- }
+
physaddr = (unsigned long)addr;
if (remap_pfn_range(vma, vma->vm_start,
physaddr >> PAGE_SHIFT,