Skip to content

Commit

Permalink
Staging: comedi: cb_pcimdas.c: Checkpatch cleanup
Browse files Browse the repository at this point in the history
WARNING: braces {} are not necessary for any arm of this statement
+	if (thisboard->has_dio) {
[...]
+	} else {
[...]

WARNING: braces {} are not necessary for single statement blocks
+			if (devpriv->BADR0) {
+				comedi_pci_disable(devpriv->pci_dev);
+			}

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Andrea Gelmini authored and Greg Kroah-Hartman committed Mar 4, 2010
1 parent e3a21d0 commit 7c2f194
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions drivers/staging/comedi/drivers/cb_pcimdas.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,11 +330,10 @@ static int cb_pcimdas_attach(struct comedi_device *dev,

s = dev->subdevices + 2;
/* digital i/o subdevice */
if (thisboard->has_dio) {
if (thisboard->has_dio)
subdev_8255_init(dev, s, NULL, devpriv->BADR4);
} else {
else
s->type = COMEDI_SUBD_UNUSED;
}

printk("attached\n");

Expand Down Expand Up @@ -365,9 +364,8 @@ static int cb_pcimdas_detach(struct comedi_device *dev)
free_irq(dev->irq, dev);
if (devpriv) {
if (devpriv->pci_dev) {
if (devpriv->BADR0) {
if (devpriv->BADR0)
comedi_pci_disable(devpriv->pci_dev);
}
pci_dev_put(devpriv->pci_dev);
}
}
Expand Down

0 comments on commit 7c2f194

Please sign in to comment.