mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-19 02:26:44 +07:00
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>
This commit is contained in:
parent
48a42206dd
commit
59a04f1135
drivers/staging/vme/devices
@ -230,7 +230,7 @@ static int pio2_probe(struct vme_dev *vdev)
|
||||
card->vdev = vdev;
|
||||
|
||||
for (i = 0; i < PIO2_VARIANT_LENGTH; i++) {
|
||||
if (isdigit(card->variant[i]) == 0) {
|
||||
if (!isdigit(card->variant[i])) {
|
||||
dev_err(&card->vdev->dev, "Variant invalid\n");
|
||||
retval = -EINVAL;
|
||||
goto err_variant;
|
||||
|
@ -190,7 +190,7 @@ int pio2_gpio_init(struct pio2_card *card)
|
||||
|
||||
label = kasprintf(GFP_KERNEL,
|
||||
"%s@%s", driver_name, dev_name(&card->vdev->dev));
|
||||
if (label == NULL)
|
||||
if (!label)
|
||||
return -ENOMEM;
|
||||
|
||||
card->gc.label = label;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user