aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/drivers/icp_multi.c
diff options
context:
space:
mode:
authorBill Pemberton <wfp5p@virginia.edu>2009-03-16 22:03:51 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-04-03 14:53:54 -0700
commit197c82bf25b9e379cb5646561be1a727ab9e84a7 (patch)
treea724481202340259075633cade03fbf15dd8b20c /drivers/staging/comedi/drivers/icp_multi.c
parent6a98d36e87a0b38d711d580b5fc9dbba17f68dfc (diff)
Staging: comedi: Remove instances of assignments in conditionals
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/comedi/drivers/icp_multi.c')
-rw-r--r--drivers/staging/comedi/drivers/icp_multi.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/staging/comedi/drivers/icp_multi.c b/drivers/staging/comedi/drivers/icp_multi.c
index aefd1c16ab2..d474cb2cb7e 100644
--- a/drivers/staging/comedi/drivers/icp_multi.c
+++ b/drivers/staging/comedi/drivers/icp_multi.c
@@ -882,7 +882,8 @@ static int icp_multi_attach(comedi_device *dev, comedi_devconfig *it)
printk("icp_multi EDBG: BGN: icp_multi_attach(...)\n");
/* Alocate private data storage space */
- if ((ret = alloc_private(dev, sizeof(icp_multi_private))) < 0)
+ ret = alloc_private(dev, sizeof(icp_multi_private));
+ if (ret < 0)
return ret;
/* Initialise list of PCI cards in system, if not already done so */
@@ -899,9 +900,11 @@ static int icp_multi_attach(comedi_device *dev, comedi_devconfig *it)
printk("Anne's comedi%d: icp_multi: board=%s", dev->minor,
this_board->name);
- if ((card = select_and_alloc_pci_card(PCI_VENDOR_ID_ICP,
- this_board->device_id, it->options[0],
- it->options[1])) == NULL)
+ card = select_and_alloc_pci_card(PCI_VENDOR_ID_ICP,
+ this_board->device_id, it->options[0],
+ it->options[1]);
+
+ if (card == NULL)
return -EIO;
devpriv->card = card;
@@ -943,9 +946,9 @@ static int icp_multi_attach(comedi_device *dev, comedi_devconfig *it)
if (this_board->n_ctrs)
n_subdevices++;
- if ((ret = alloc_subdevices(dev, n_subdevices)) < 0) {
+ ret = alloc_subdevices(dev, n_subdevices);
+ if ( ret < 0 )
return ret;
- }
icp_multi_reset(dev);