summaryrefslogtreecommitdiff
path: root/drivers/staging/vme/devices/vme_user.c
diff options
context:
space:
mode:
authorEgor Uleyskiy <egor.ulieiskii@gmail.com>2015-11-22 09:27:56 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-11-24 23:30:50 (GMT)
commit59a04f11350bcf5653aee760fb3d5e06a651b640 (patch)
tree53352861e9698ee988f559f278a10dae4e95f4f9 /drivers/staging/vme/devices/vme_user.c
parent48a42206dd343f490f40ddaf44e8f0f9fb3aed37 (diff)
downloadlinux-59a04f11350bcf5653aee760fb3d5e06a651b640.tar.xz
drivers: staging: vme: Fixed checking NULL and 0 code style
Signed-off-by: Egor Uleyskiy <egor.ulieiskii@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vme/devices/vme_user.c')
-rw-r--r--drivers/staging/vme/devices/vme_user.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c
index a05a065..b95883b 100644
--- a/drivers/staging/vme/devices/vme_user.c
+++ b/drivers/staging/vme/devices/vme_user.c
@@ -309,7 +309,7 @@ static int vme_user_ioctl(struct inode *inode, struct file *file,
case VME_IRQ_GEN:
copied = copy_from_user(&irq_req, argp,
sizeof(irq_req));
- if (copied != 0) {
+ if (copied) {
pr_warn("Partial copy from userspace\n");
return -EFAULT;
}
@@ -335,7 +335,7 @@ static int vme_user_ioctl(struct inode *inode, struct file *file,
copied = copy_to_user(argp, &master,
sizeof(master));
- if (copied != 0) {
+ if (copied) {
pr_warn("Partial copy to userspace\n");
return -EFAULT;
}
@@ -350,7 +350,7 @@ static int vme_user_ioctl(struct inode *inode, struct file *file,
}
copied = copy_from_user(&master, argp, sizeof(master));
- if (copied != 0) {
+ if (copied) {
pr_warn("Partial copy from userspace\n");
return -EFAULT;
}
@@ -380,7 +380,7 @@ static int vme_user_ioctl(struct inode *inode, struct file *file,
copied = copy_to_user(argp, &slave,
sizeof(slave));
- if (copied != 0) {
+ if (copied) {
pr_warn("Partial copy to userspace\n");
return -EFAULT;
}
@@ -390,7 +390,7 @@ static int vme_user_ioctl(struct inode *inode, struct file *file,
case VME_SET_SLAVE:
copied = copy_from_user(&slave, argp, sizeof(slave));
- if (copied != 0) {
+ if (copied) {
pr_warn("Partial copy from userspace\n");
return -EFAULT;
}
@@ -757,7 +757,7 @@ static int __init vme_user_init(void)
* we just change the code in vme_user_match().
*/
retval = vme_register_driver(&vme_user_driver, VME_MAX_SLOTS);
- if (retval != 0)
+ if (retval)
goto err_reg;
return retval;